userse31 [he/him] to chat • 2 years agoWhy the FUCK is "light_map[i][[j]" resolving as undefined when a lot of shit happens?message-squaremessage-square4 fedilinkarrow-up17file-text
arrow-up17message-squareWhy the FUCK is "light_map[i][[j]" resolving as undefined when a lot of shit happens?userse31 [he/him] to chat • 2 years agomessage-square4 Commentsfedilinkfile-text
minus-squareThe_Walkening [none/use name]hexbear4·edit-22 years agoUnless you explicitly state the return value, JS returns undefined as the return value for functions, - might be what's happening if your code is otherwise working/doing stuff. link
minus-squareuserse31 [he/him]hexagonhexbear3·2 years agoOh no, it just pretends it doesn't exist. Egh. Whatever. I just bodged a try statement in there. Not the proper fix, but the issue only crops up when theres a lot of lighting updates happen. link
Unless you explicitly state the return value, JS returns undefined as the return value for functions, - might be what's happening if your code is otherwise working/doing stuff.
Oh no, it just pretends it doesn't exist.
Egh. Whatever. I just bodged a try statement in there. Not the proper fix, but the issue only crops up when theres a lot of lighting updates happen.