fubark / cyber

Fast and concurrent scripting.
https://cyberscript.dev
MIT License
1.18k stars 40 forks source link

Issue with incrementing variable by 1 #14

Closed sts10 closed 1 year ago

sts10 commented 1 year ago

I might be missing something, but when I throw this in the playground

i = 0 
print i 
i = i + 1
print i

I get

0
2

I would expect

0
1

I got here after having some issues with a for loop at the end of this little script.

sts10 commented 1 year ago

Ah, i += 1 works as expected, it seems.

fubark commented 1 year ago

This should be fixed. It was working inside function blocks before, this fix is for the main block.