Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] [FIXED] inputtext cant extract to integer variable just made number 0, strval

 
  • 0 Vote(s) - 0 Average
Pawn [FIXED] inputtext cant extract to integer variable just made number 0, strval
PutuSuhartawan
Offline

Burgershot Member
Posts: 120
Threads: 52
Joined: Nov 2020
Reputation: 1
Location: Indonesia
#1
2021-03-22, 02:33 PM (This post was last modified: 2021-04-02, 05:58 AM by PutuSuhartawan.)
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);
RhaegarX
Offline

Burgershot Member
Posts: 66
Threads: 12
Joined: Nov 2020
Reputation: 4
#2
2021-03-22, 04:10 PM (This post was last modified: 2021-03-22, 04:11 PM by RhaegarX.)
PHP Code:
new intValue = strval(inputtext); 
is this what you are looking for?
https://open.mp/docs/scripting/functions/strval
PutuSuhartawan
Offline

Burgershot Member
Posts: 120
Threads: 52
Joined: Nov 2020
Reputation: 1
Location: Indonesia
#3
2021-03-22, 09:42 PM
(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
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode