store_and is actually val_and?!

Users who are viewing this thread

agrippa

Veteran
Code:
(store_script_param,:tmp_5,1),
(store_script_param,:tmp_4,2),
(store_script_param,:tmp_7,3),
(store_script_param,:tmp_6,4),
(store_and,:tmp_2,:tmp_5,:tmp_4),
(store_and,:tmp_1,:tmp_7,:tmp_6),
(val_add,:tmp_2,:tmp_1),
(store_and,:tmp_1,:tmp_5,:tmp_6),
(val_sub,:tmp_2,:tmp_1),
(store_and,:tmp_1,:tmp_7,:tmp_4),
(val_sub,:tmp_2,:tmp_1),
(assign,72057594037927936,:tmp_2),

Looks like no problems, huh? But this is what compiler says:

Code:
ERROR: Usage of unassigned local variable: :tmp_2
ERROR: Usage of unassigned local variable: :tmp_1
ERROR: Usage of unassigned local variable: :tmp_2
ERROR: Usage of unassigned local variable: :tmp_1
ERROR: Usage of unassigned local variable: :tmp_1
ERROR: Usage of unassigned local variable: :tmp_2
ERROR: Usage of unassigned local variable: :tmp_1
ERROR: Usage of unassigned local variable: :tmp_1
ERROR: Usage of unassigned local variable: :tmp_2
ERROR: Usage of unassigned local variable: :tmp_1
ERROR: Usage of unassigned local variable: :tmp_2

WHAT means unassigned? The store_and sintax is (store_and, <destination>, <value>, <value>), so what's the problem?
 
Define it first.
I don't know why it behave differently from other store_ functions, but if you put a (assign, variable, value) before using this variable as destination of store_and, it works fine.
 
Back
Top Bottom