View previous topic :: View next topic |
Author |
Message |
SAMASAL Newbie cheater Reputation: 0
Joined: 02 Apr 2015 Posts: 11
|
Posted: Sun Jul 02, 2017 4:43 am Post subject: HELP WITH THIS FOR - INCREASE ADDRESS BY 1 |
|
|
Is basically something around this lines:
local addr = "B94B0040"
for xxxxx do
stuff
addr = addr.."+1"
end
Now the script works but the help I need is with:
addr = addr.."+1"
The reason is that as the FOR does several thousands loops. the variable addr is being stored as addrr+1+1+1+1+1 etc instead of increasing the base value B94B0040, this seems to be slowing down the iterations a lot, I am very new to LUA please bear with me, thank you! |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Sun Jul 02, 2017 5:58 am Post subject: |
|
|
addr=getAddressSafe("B94B0040")
for xxxx do
stuff
addr=addr+1
end _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
SAMASAL Newbie cheater Reputation: 0
Joined: 02 Apr 2015 Posts: 11
|
Posted: Mon Jul 03, 2017 12:31 am Post subject: |
|
|
Dark I am using val = readInteger(addr) in the middle of the loop, also val2 = readInteger(addr+30), in the middle of the For, however these two seems to no longer give me the results I would expect after using getAddressSafe.
What is getAddressSafe doing, converting my hex address to number? is there a way to keep it as hex?
Thanks for helping a noobie. |
|
Back to top |
|
|
|