01.11.2017, 15:03
You asked how you can check if a variable is a string or integer, but that doesn't really make sense because a string is an integer array! So your question must be a) How to get the tag of a variable (array or not), and b) How to determine if a variable is an array.
To determine the tag of a variable you can use tagof() which is a compiler function (like sizeof).
https://sampwiki.blast.hk/wiki/Keywords:Operators#tagof
You could use sizeof() to check whether or not a variable potentially is an Array. But it's only useful if the variable you are checking is existing by name (at that point you already know if it's an array or not..).
However these may be completely useless depending on what you are trying to do, so please be a bit more specific.
To determine the tag of a variable you can use tagof() which is a compiler function (like sizeof).
https://sampwiki.blast.hk/wiki/Keywords:Operators#tagof
You could use sizeof() to check whether or not a variable potentially is an Array. But it's only useful if the variable you are checking is existing by name (at that point you already know if it's an array or not..).
However these may be completely useless depending on what you are trying to do, so please be a bit more specific.