Maplas Posted May 23, 2018 Share Posted May 23, 2018 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! Link to comment Share on other sites More sharing options...
CmP Posted May 23, 2018 Share Posted May 23, 2018 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. Link to comment Share on other sites More sharing options...
Administrators Enyby Posted May 23, 2018 Administrators Share Posted May 23, 2018 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.