Easy Question
#1

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?
Reply
#2

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

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

Of what? A variable?
Reply
#5

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

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

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.
Reply
#8

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

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.
Reply
#10

use 'tagof'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)