• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] [FIXED] inputtext cant extract to integer variable just made number 0, strval
#1
Quote:extract?inputtext[20]?->?new?BidPrice;



Why the integer after extract the iputtext variable has found = 0?

How to extract inputtext variable?to integer actually?



FIXED

Inputtext is a string data type, you have to change it to an integer first. If you want to store it to a variable that has an integer type, use a function called strval. So strval (inputtext)

BidPrice = strval(inputtext);
  Reply
#2
PHP Code:
new intValue strval(inputtext); 
is this what you are looking for?
https://open.mp/docs/scripting/functions/strval
  Reply
#3
Lightbulb 
(2021-03-22, 04:10 PM)RhaegarX Wrote:
PHP Code:
new intValue strval(inputtext); 

is this what you are looking for?

https://open.mp/docs/scripting/functions/strval



Best Answer
  Reply


Forum Jump: