Need help with Dialog inputtext error! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need help with Dialog inputtext error! (
/showthread.php?tid=477592)
Need help with Dialog inputtext error! -
Jacksta21 - 24.11.2013
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!
Re: Need help with Dialog inputtext error! -
-Prodigy- - 24.11.2013
pawn Код:
PlayerInfo[playerid][pAge] = inputtext;
to
pawn Код:
PlayerInfo[playerid][pAge] = strval(inputtext);
Re: Need help with Dialog inputtext error! -
Jacksta21 - 24.11.2013
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
Re: Need help with Dialog inputtext error! -
Jacksta21 - 24.11.2013
Anybody able to help? Really can't figure out whats wrong here :/
Re : Need help with Dialog inputtext error! -
Noliax8 - 24.11.2013
Give me more code
Re: Need help with Dialog inputtext error! -
erminpr0 - 24.11.2013
try return 1 instead of 0
Re: Need help with Dialog inputtext error! -
-Prodigy- - 24.11.2013
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
Re: Need help with Dialog inputtext error! -
Jacksta21 - 24.11.2013
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 -.-