inputtext to integer
#1

Hello ladies and gentleman,
Quick little question about something that I forgot.
If I want to convert the inputtext in a dialog to an integer, should I use floatstr and then floatround? Or must I do it in a different way?

Example:

someone types in 140. This is obviously in a string format because it is inputtext, but I want it in integer format.
How?


Thank you, I can't quite remember how to do this.
Reply
#2

You need to use Strval

pawn Код:
new number = strval(inputtext);
Reply
#3

Quote:
Originally Posted by [MM]RoXoR[FS]
Посмотреть сообщение
You need to use Strval

pawn Код:
new number = strval(inputtext);
Ow wow, allnighters aren't good for me lol.
Thank you for reminding me >.>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)