ID:143517
 
anyone know what causes this runtime error?
runtime error: bad icon
if(usr!=null)
if(isicon(usr.icon))
if(IS in icon_states(usr.icon))

it happens on the last line of that code
it happens randomly, and it seems to happen on just about anything, mostly players though
i added those 2 ifs to try and fix it! but no luck
IS should be the name of an icon state
i wonder if it could be happening when IS is null o.O
hrmmmmm, any help would be apreciated!
In response to Falacy
also this happens in byond 3.4, 3.5, and 4.0
try: icon_states(icon(usr.icon))

otherwise, show me your entire function. You may not want to be using usr here, as it may be null in this context.