You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've discovered that alternately copy-pasting and deleting this snippet of code:
var hello = 13
draw_text(0, 0, string(hello))
As the sole code of a draw event, results in the line
.localvar 3 hello X
Incrementing the value of X by 1 each time you do so.
Demonstration.mp4
The text was updated successfully, but these errors were encountered:
SolventMercury
changed the title
Compile Error - Copy Pasting Code Repeatedly Causes Local Var Thing To Increment
Copy Pasting Code Repeatedly Causes Local Var Thing To Increment
Nov 20, 2021
SolventMercury
changed the title
Copy Pasting Code Repeatedly Causes Local Var Thing To Increment
Copy Pasting Code Repeatedly Causes Local Count Thing To Increment
Nov 20, 2021
SolventMercury
changed the title
Copy Pasting Code Repeatedly Causes Local Count Thing To Increment
Copy Pasting Code Repeatedly Causes Local Var Count To Increment
Nov 20, 2021
Probably already known, but the cause for this is that every time var hello is written, a new code local hello gets created. When that code gets removed, UTMT doesn't check if hello is still in use / if it can be removed from the code locals list.
While it would be neat if UTMT could check that, it'd probably lead to weird behaviour. What if someone wanted to have a code local that isn't referenced by anything?
I've discovered that alternately copy-pasting and deleting this snippet of code:
As the sole code of a draw event, results in the line
Incrementing the value of X by 1 each time you do so.
Demonstration.mp4
The text was updated successfully, but these errors were encountered: