Inputtext errors
#1

pawn Код:
AVehicleData[vid][Fuel] +inputtext;
Error:
Код:
error 033: array must be indexed (variable "inputtext")
Same error on this line:
pawn Код:
new RefuelPrice = (Amount * RefuelMaxPrice) / inputtext;
Reply
#2

Use
pawn Код:
strval(inputtext)
Strval
Reply
#3

If you input in the dialog an integer:
pawn Код:
new RefuelPrice = (Amount * RefuelMaxPrice) / strval(inputtext);
else if a float:
pawn Код:
new RefuelPrice = (Amount * RefuelMaxPrice) / floatstr(inputtext);
Reply
#4

Thanks InfiniTy. and Konstantinos
+rep
Reply
#5

In my understand code should look like this, you forgot a =

pawn Код:
AVehicleData[vid][Fuel] = strval(inputtext);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)