calling an object that doesn't exist
BlitzMax Forums/BlitzMax Beginners Area/calling an object that doesn't exist
| ||
if I call an object that doesn't exist,I'll get an error,how do you check that there is an object bwefore calling on it? thanks, mudcat |
| ||
Check if its null? |
| ||
how? if trock.create()<>null? |
| ||
You don't "call an object". You call a method on a given object. Which fails if the object is null. how? No, like thisif trock.create()<>null? if myobject<>null then... |
| ||
In your case,If trock<>Null Then... |
| ||
Thanks all, I am getting the hang of it,with everyones help. mudcat |