Variable declaration and assigment in one line not working
MiranDMC opened this issue · 4 comments
MiranDMC commented
This code will compile and work as expected:
int data
data = read_memory 0x... {size} 4 {vp} true
Line below will compile, but arguments order is invalid.
int data = read_memory 0x... {size} 4 {vp} true
read_memory will throw error about accessing address 0 (seems like data becomes first argument).
x87 commented
can you attach a compiled .cs file?
what edit mode are you using?
MiranDMC commented
what edit mode are you using?
GTA SA 1.0 SBL
MiranDMC commented
Hm seems be more complicated scenario. In simple test case it works... I need to investigate further.
{$CLEO .cs}
nop
define function FOO()
wait 0
FOO()
terminate_this_custom_script
function FOO()
int addr = read_memory 0x00447097 {size} 4 {vp} true
print_formatted_now {fmt} "ADDRESS %X" {time} 20000 {arg} addr
cleo_return
end
MiranDMC commented
I was not able to reproduce the problem in small test scripts. Seems like caused by other mistakes during project conversion to SBL mode.