open.mp forum
[Pawn] [FIXED] inputtext cant extract to integer variable just made number 0, strval - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] [FIXED] inputtext cant extract to integer variable just made number 0, strval (/showthread.php?tid=1792)



[FIXED] inputtext cant extract to integer variable just made number 0, strval - PutuSuhartawan - 2021-03-22

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);


RE: Help inputtext cant extract to integer variable just made number 0 - RhaegarX - 2021-03-22

PHP Code:
new intValue strval(inputtext); 
is this what you are looking for?
https://open.mp/docs/scripting/functions/strval


RE: Help inputtext cant extract to integer variable just made number 0 - PutuSuhartawan - 2021-03-22

(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