ID:373140
 
(See the best response by DarkCampainger.)
Code:
world/New()
spawn(-1)
PopulateDamageNums()
return ..()


Problem description:
Just wondering what spawn(-1) does.
Best response
Ahem.
"If delay is negative, the spawned code is executed before continuing in the main code."

So it creates a virtual thread, runs the spawned code first (until it hits a sleep of some sort) and then continues the original thread. One other effect is this:
"Any vars you have defined in the proc itself, including arguments, will be copied between the spawned code and the code that runs right away. This means that if one part modifies one of those vars, the other part will not see that change. Changes made to objects, lists, datums, etc. however will be visible to both code blocks. "
Don't see how I missed that in the reference... thanks!