type/variable error
Blitz3D Forums/Blitz3D Beginners Area/type/variable error
| ||
Can anyone explain why the line 'if id<>1 etc' gives me a 'variable must be a type' error? The 3target objects are created and the program works fine if i add ';' to this line of code. I thought that type objects are global yet this function doesnt seem to see them thanks |
| ||
That would depend on the definition of "target_1". If it's not declared as a type, then this won't work. |
| ||
all targets are declared as types, the whole program works fine but it doesnt appear to be recognised in this function, check my code on my other posts to see for yourself |
| ||
http://www.blitzbasic.com/Community/posts.php?topic=37946 |
| ||
You need to declare target_1, target_2 and target_3 as Global or pass them in as params to your explode_target() function. Type lists are global but pointers to specific instances still need to be declared so, just as any other var does. |