--for information, i need to edit 100 items--
--t[1], t[1].address +150, t[1].address +300, t[1].address +450, ..etc.--
--I already know the pattern is t[1].address +(150*n)--
--its for edit first item--
t = gg.getResults(5)
for i, v in ipairs(t) do
t[1].value = 99
end
gg.setValues(t)
--here the problem --
--QUESTION : how to edit 2nd item untill 100th item in one command?--
for i, v in ipairs(t) do
t[1].address = t[1].address +150
t[1].value = 99 --edit 2nd item--
end
gg.setValues(t)
--its waste time to edit it one by one untill 100th item--
--i did some trial and error to edit all of them in one shoot--
--like n = (1~100) , t[1].address = t[1].address + (150*n)--
--but fail, i tried on gg.alert(1~100) its show alert 101, i feel stupid --
-- I TRIED TO SEARCH REFERENCES FOR THIS,--
--READ Some guide on this web, but not yet found the answear.--
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.
Question
Kimiice7
Help me to build this script..
gg.setRanges(gg.REGION_C_ALLOC)
gg.searchNumber('0;1;2:', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.refineNumber('0', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
--for information, i need to edit 100 items--
--t[1], t[1].address +150, t[1].address +300, t[1].address +450, ..etc.--
--I already know the pattern is t[1].address +(150*n)--
--its for edit first item--
t = gg.getResults(5)
for i, v in ipairs(t) do
t[1].value = 99
end
gg.setValues(t)
--here the problem --
--QUESTION : how to edit 2nd item untill 100th item in one command?--
for i, v in ipairs(t) do
t[1].address = t[1].address +150
t[1].value = 99 --edit 2nd item--
end
gg.setValues(t)
--its waste time to edit it one by one untill 100th item--
--i did some trial and error to edit all of them in one shoot--
--like n = (1~100) , t[1].address = t[1].address + (150*n)--
--but fail, i tried on gg.alert(1~100) its show alert 101, i feel stupid --
-- I TRIED TO SEARCH REFERENCES FOR THIS,--
--READ Some guide on this web, but not yet found the answear.--
gg.alert('THANKS FOR HELPING ME ')
Help Set Multiple Values.lua
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.