I just stumped upon Deji's SuperVars and this was mentioned in readme
I don't know what exactly it's means
but i make a quick test by trying make 1024 additional vars and found no problem. So, i've decided to share this. Might come in handy for coders. Removing limitations of vars
I originally created the script 'ExtraVars' which demonstrated
a way to extend the limitations on variable usage by directly
accessing memory using var arrays. A little example:
1@(31@,1i)
...
However, this method wasn't without fault. I started noticing
crashes caused by the index falling to certain values and
causing the game to write to a bad section of memory.
I don't know what exactly it's means
but i make a quick test by trying make 1024 additional vars and found no problem. So, i've decided to share this. Might come in handy for coders. Removing limitations of vars
Code:
0A90: 28@ = 4 * 1024 // int
0AC7: 29@ = var 0@ offset // get the pointer to the last usable variable
0AC8: 30@ = allocate_memory_size 28@
0A8F: 31@ = 30@ - 29@ // get the offset from variable 0@ to the memory
0016: 31@ /= 4 // divide by array size to get the index
0085: 28@ = 31@ // (int)
0006: 1@ = 0
0006: 2@ = 0
//fill extra var 0@(31@,4i) - 1023@(31@,4i)
for 1@ = 0 to 1023 step 1
0A90: 2@ = 1@ * 2 // int
0085: 0@(28@,4i) = 2@ // (int)
0AD1: show_formatted_text_highpriority "[Offset: %d]~n~[%d@: %d]" time 500 31@ 1@ 0@(28@,4i)
wait 0
000A: 28@ += 1
end
//compare variable and value
while true
wait 0
0AD1: show_formatted_text_highpriority "[Offset: %d]~n~[0@: %d][193@: %d][298@: %d]~n~[518@: %d][763@: %d][888@: %d]~n~[954@: %d][1023@: %d]" time 2000 31@ 0@(31@,4i) 193@(31@,4i) 298@(31@,4i) 518@(31@,4i) 763@(31@,4i) 888@(31@,4i) 954@(31@,4i) 1023@(31@,4i)
end