Need help with Dialog inputtext error!
#1

Hey there. I'm trying to make it so new players enter their age via a dialog box. I get 2 errors:
Код:
(69296) : error 029: invalid expression, assumed zero
(69301) : warning 225: unreachable code
(69302) : error 006: must be assigned to an array
The code for the dialog can be found here:
http://pastebin.com/hJAB4WHR
Any help would be much appreciated!
Reply
#2

pawn Код:
PlayerInfo[playerid][pAge] = inputtext;
to
pawn Код:
PlayerInfo[playerid][pAge] = strval(inputtext);
Reply
#3

Thanks, that fixed the array error, I still have the error and warning that I'm not sure how to fix...
Код:
(69296) : error 029: invalid expression, assumed zero
(69301) : warning 225: unreachable code
These lines are:

Код:
	        if(strval(inputtext) < 18 || strval(inputtext) > 90)) //Line 69296
	        {
	            ShowPlayerDialog(playerid, TUTAGE, DIALOG_STYLE_INPUT, "Enter your age", "{FB3008}Valid ages: 18 - 90 years old!", "Continue", "");
	            return 0;
	        }
  			TutStep[playerid] = 1; //Line 69301
Reply
#4

Anybody able to help? Really can't figure out whats wrong here :/
Reply
#5

Give me more code
Reply
#6

try return 1 instead of 0
Reply
#7

You have 2 closing ")" in
pawn Код:
if(strval(inputtext) < 18 || strval(inputtext) > 90)) //Line 69296
Should be:
pawn Код:
if(strval(inputtext) < 18 || strval(inputtext) > 90) //Line 69296
Reply
#8

Wow.. Thanks for the help guys, but I just found en extra bracket after the 90, removed and all is fixed.. Fell like a dumbass -.-
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)