Not to make anyone cry again but...
Why is it I can't assign a value to a global and at the same time compute a new value, like this:
GLOBAL x = y / z
If I look into variable x now with debug I get the answer -1.#IND
if I do this it works as expected:
GLOBAL x
x = y / z
I saw you Gernot use the first line in your examples so I started doing this myself and at the last update my game broke down :-)
(And no, this is not the actual program, just the simplest recreation of the problem, you know who you are :-)
Do we get a bug-report forum? And can we start posting bugs in separate threds so they are easier to keep track of? Not bake them into the announcement thread of an old version? (Never wanted to be a forum moderator but I'm used to nicely moderated forums :-)
A bug report forum!? I'm for it. Anyone else? :D
Cheers
if z=0, then x will be 1-inf
z was not zero, the only thing I had to do to fix it was to move down the "= y / z" on the line below, put an x in front and then it worked.
strange. Can you provide a complete mini-sample?
Mini example
but after updating to IDE version 5.040 it seems to be working fine, thanks!
// IDE Version: 5.037
GLOBAL sx,sy,width
GETSCREENSIZE sx, sy
width = 40
// This gets the wrong result
GLOBAL y1 = sx / width
DEBUG " y1=" + y1 + " sx=" + sx + " width=" + width + "\n"
// If I do the same but split the line I get the correct result
GLOBAL y2
y2 = sx / width
DEBUG " y2=" + y2 + " sx=" + sx + " width=" + width + "\n"
Right. The GLOBAL was wrong internally. Oh dear, this was such a bed error. It left out the whole line and led to great confusions...