SA-MP Forums Archive
Convert string to int - 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: Convert string to int (/showthread.php?tid=624917)



Convert string to int - Nubik - 25.12.2016

From wiki
PHP код:
new string[4] = "250";
new 
iValue strval(string); 
works but if string = "n250" doesn't work
I want to convert string "n250" to integer 250


Re: Convert string to int - coool - 25.12.2016

The strings are really made up of numbers Read this https://wiki.alliedmods.net/index.ph...torial#Strings so you can't just change "n" in a single number it is a group of number saved in one variable. To see how numbers are converted in strings refer to this www.asciitable.com But don't know to convert string in number (Sorry)


Re: Convert string to int - Nubik - 25.12.2016

Solved by using strdel