SA-MP Forums Archive
Easy Question - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Easy Question (/showthread.php?tid=313944)



Easy Question - T0pAz - 28.01.2012

In this example
pawn Код:
stock GetData(data)
{
     switch(data)
    {
          case float: { bla }
          case int: { bla }
          case string: { bla }
    }
}
How to possibly do a similar thing like in example shown above?


Re: Easy Question - MP2 - 28.01.2012

I don't understand what you're asking. Explain clearly.


Re: Easy Question - T0pAz - 28.01.2012

Quote:
Originally Posted by MP2
Посмотреть сообщение
I don't understand what you're asking. Explain clearly.
How to get the datatype?


Re: Easy Question - MP2 - 28.01.2012

Of what? A variable?


Re: Easy Question - T0pAz - 28.01.2012

Quote:
Originally Posted by MP2
Посмотреть сообщение
Of what? A variable?
Yes the data.


Re: Easy Question - MP2 - 28.01.2012

Why would you need that? I doubt it's possible.


Re: Easy Question - T0pAz - 28.01.2012

Quote:
Originally Posted by MP2
Посмотреть сообщение
Why would you need that? I doubt it's possible.
Why you want to know that? Anyways it's on the example above.


Re: Easy Question - 2KY - 28.01.2012

You can use "IsANumber" (found somewhere in the Useful Functions topic) to see if it's an integer, otherwise, I'm not sure.


Re: Easy Question - T0pAz - 28.01.2012

Quote:
Originally Posted by 2KY
Посмотреть сообщение
You can use "IsANumber" (found somewhere in the Useful Functions topic) to see if it's an integer, otherwise, I'm not sure.
Please see the example above. That's how I want it to be.


Re: Easy Question - Lorenc_ - 28.01.2012

use 'tagof'