incompatible types?
Posted:
Tue Feb 05, 2008 4:07 pm
by asmodeus
Why doesn't this work?: I create a variable called test_var[5][5]. I write test_var = 0; in the script editor and it tells me "incompatible types". How can I avoid this problem?
Re: incompatible types?
Posted:
Tue Feb 05, 2008 4:15 pm
by makslane
Are you trying to change the adrees of the variable test_var to 0.
What you want to do?
Re: incompatible types?
Posted:
Tue Feb 05, 2008 6:02 pm
by asmodeus
No, I want to read the value to get a color for the setpen function. (setpen(test_var[...)
Re: incompatible types?
Posted:
Tue Feb 05, 2008 6:30 pm
by makslane
Try use:
test_var[0][0] = somevalue;
Or somevalue = test_var[0][0];
Re: incompatible types?
Posted:
Tue Feb 05, 2008 6:37 pm
by asmodeus
The problem is, that I want to write a variable name and "+", "-", "/", "*" instead of only a number.
in my game it is [320/2-320*vari+xcount*var] and that in both arrays.
If I use it only in one of them and write a single number in the other array, than it works.
Re: incompatible types?
Posted:
Wed Feb 06, 2008 12:27 pm
by asmodeus
first: It doesn't work, yet.
(view screenshot)
second: I don't want to change the value from the test_var with the arrays, I want to
read the value and put the value in another variable.
Re: incompatible types?
Posted:
Wed Feb 06, 2008 12:34 pm
by makslane
Re: incompatible types?
Posted:
Wed Feb 06, 2008 12:42 pm
by asmodeus
Thanks! That was the problem, I think.