inputtext to integer - 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: inputtext to integer (
/showthread.php?tid=362382)
inputtext to integer -
milanosie - 24.07.2012
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.
Re: inputtext to integer -
[MM]RoXoR[FS] - 24.07.2012
You need to use
Strval
pawn Код:
new number = strval(inputtext);
Re: inputtext to integer -
milanosie - 24.07.2012
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 >.>