| View previous topic :: View next topic |
| Author |
Message |
Frouk Grandmaster Cheater
Reputation: 5
Joined: 22 Jun 2021 Posts: 510
|
Posted: Tue Aug 30, 2022 6:43 am Post subject: Array access |
|
|
how to access array in lua like:
array[5]
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25838 Location: The netherlands
|
Posted: Tue Aug 30, 2022 6:50 am Post subject: |
|
|
you create a table and then copy the contents of the array over to the table, when done, write it back
or, you create a table, and then attach a metadata table that intercepts the accesses to the table, and converts those into specific reads/writes
_________________
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 |
|
 |
Frouk Grandmaster Cheater
Reputation: 5
Joined: 22 Jun 2021 Posts: 510
|
Posted: Tue Aug 30, 2022 6:55 am Post subject: |
|
|
what to do if array contains pointers?
do like this?:
| Code: | local arrPtr = {}
for i = 0, readByte(0xA9E7B0) do --current number of elements
arrPtr[i] = readPointer(0xA9E7B0 + 0x8 + i * 0x4) --array start
end |
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25838 Location: The netherlands
|
Posted: Tue Aug 30, 2022 7:34 am Post subject: |
|
|
if it's an array of pointers, then read them as pointers yes
_________________
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 |
|
 |
Frouk Grandmaster Cheater
Reputation: 5
Joined: 22 Jun 2021 Posts: 510
|
Posted: Tue Aug 30, 2022 7:39 am Post subject: |
|
|
| ok, ty
|
|
| Back to top |
|
 |
|