tagof test
#1

Why does this crash the compiler?:

pawn Код:
new Float:fTest;
if (tagof (fTest) == tagof (Float:)) print("float");
What's the correct way to do this?
Reply
#2

pawn Код:
new
    Float:myFloat,
    myVar;
myVar = tagof(myFloat);
if (myVar == tagof(Float:))
{
    // do something
}
Reply
#3

I am NOT sure, since I've never been into these parts of water but I guess the correct format (as I learnt from wiki) is:

pawn Код:
new Float:fTest, Float:fTest2;
if (tagof (fTest) == tagof (fTest2)) print("float");
EDIT: Seems like you cannot use tags in tagof() operator. It is for getting tag of something, since you cannot get tag of a tag logically, maybe that's the thing crashes the compiler.
Reply
#4

Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)