Jump to content

Edit certain values in gg.searchNumber but not gg.editAll


Maplas

Recommended Posts

Posted
Quote

gg.searchNumber('123;200;405', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(41)print('Replaced: ', gg.editAll('0', gg.TYPE_DWORD))

How can I edit only (x) values and not all?? ex in gg.searchNumber I have 3 values 123, 200, and 405

and I only want to edit 123 and 200 what code should is use and replaced with gg.editAll?

Hoping someone could help me

Thank you!

Posted

There was very similar question in "LUA scripting" topic recently.

LUA scripting (#452ug9dd)

Here is good answer to both of the questions by Enyby:

Quote

Read results into table. Iterate over this table. In loop body check value. If it has specified value - add it to table with changes. after loop setValues with new table with changes.

 

  • Administrators
Posted
gg.searchNumber('123;200;405', gg.TYPE_DWORD)
gg.searchNumber('123;200', gg.TYPE_DWORD)
gg.getResults(41)
print('Replaced: ', gg.editAll('0', gg.TYPE_DWORD)) 

Also you can use refine for skip unnecessary values.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.