07.01.2015, 21:43
Yes, but the problem is before you convert a integer or float to a string, you have to know if it's either a integer or float beforehand... so that makes this function useless.
At this moment you can only pass strings, if you enter a variable that is a integer or float it will give you a Tag-Mismatch error:
Too bad there is no function (as far as I know) that converts anything (regardless the variable-type) into a string.
At this moment you can only pass strings, if you enter a variable that is a integer or float it will give you a Tag-Mismatch error:
pawn Код:
new Integer = 540;
new Float:FloatingPoint = 3.14;
new StringString[12] = "Hello";
new StringFloat[12] = "30.1391";
new Type0 = GetVarType(Integer); // this will result in a tag-mismatch error
new Type1 = GetVarType(FloatingPoint); // this will result in a tag-mismatch error
new Type2 = GetVarType(StringString); // This will work and return '2'.
new Type3 = GetVarType(StringFloat); // This will work too and returns '1'.