If you define a var on a proc, and on the same proc you use spawn() while(), even when that var is updated on the proc, it won't suffer any change below while()
Numbered Steps to Reproduce Problem:
Use the following command.
Code Snippet (if applicable) to Reproduce Problem:
Let's imagine we have this:
mob/proc/Test()
var/T
spawn(30) T = 1
spawn() while(!T) {world<<"Called"; sleep(10)}
It'll continue displaying "Called" after 3 seconds. For some reason T value isn't updated on while, even if you try something like world<<"Called [T]", it'll still display "Called " (not "Called 1").
Expected Results:
while(!T) should stop.
Actual Results:
while(!T) is called as T value isn't updated on that.
Does the problem occur: Yes
Every time? Or how often? Every time
In other games? Yes
In other user accounts? Yes
On other computers? Yes
When does the problem NOT occur?
If you define the var on a mob, obj, or anything that exists on the game outside of that proc, it'll work. If T was a var defined for every mob, and it was updated on the proc, while(!T) would stop working after 3 seconds. But if the var is defined on the proc, it won't.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
I've tested every BETA Version and it occured in all of them.
DM Reference (spawn):