• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] How to convert string to int?
#1
Question 
Please tell me if there is any function that does this or how I could make a function that does this.
  Reply
#2
https://open.mp/en/docs/scripting/functions/strval
  Reply
#3
Thanks dude.
  Reply
#4
sscanf is better, it has better error returns and deals with separators.
  Reply
#5
(2021-07-04, 07:52 PM)Y_Less Wrote: sscanf is better, it has better error returns and deals with separators.

Good, you could create a (where not to) use sscanf tutorial tho, it's really not needed when only a single number is in question.. (simply isnumeric > value = strval)
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply


Forum Jump: