aseliot 2 Posted March 9, 2016 So i have task05 which has not been made yet, i tried to do; if(isNull task05) then {...}; this doesnt work. when printing it with a hint it said "any". Then I used typeName and it returned "" as empty. So it doesn't have a type and is not null? I don't understand what is happening I have used isNull previously (but inverse with !) but now I can't get it work. What is an any type? Share this post Link to post Share on other sites
st_dux 26 Posted March 9, 2016 (edited) isNull only works if there is something that could be null. A variable that points to nothing at all is not null; it is undefined. To check if something is undefined, use isNil instead. if (isNil "task05") then {...} Alternatively, you could set up your task variables before actually creating all of your tasks; in this case, isNull could work. Some people will tell you that this is a better practice, although personally I don't think it makes any difference at all. Here's how you'd do that: task05 = taskNull; if (isNull task05) then {...}; Edited March 9, 2016 by st_dux Share this post Link to post Share on other sites
aseliot 2 Posted March 9, 2016 Okay thanks must've been a fluke that it worked with the other one's. Probably because !isNull can still be something else i guess :p Share this post Link to post Share on other sites