inputtext HELP - 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: inputtext HELP (
/showthread.php?tid=599567)
inputtext HELP -
SumX - 27.01.2016
Hello! Why I am getting those errors?
PHP код:
if(dialogid == DIALOG_PASSWORD)
{
if(response)
{
if(strlen(inputtext) <= 12 && strlen(inputtext) >= 6) // (25762)
{
format(PasswordRemember[playerid], sizeof(PasswordRemember[playerid]), "%s", inputtext);//(25764)
PlayerTextDrawSetString(playerid, TextdrawPassword[playerid], PasswordRemember[playerid]);
DatePersonale[playerid]++;
}
else
{
ShowPlayerDialog(playerid, DIALOG_PASSWORD, DIALOG_STLYE_PASSWORD, "You:RPG Registration System:", "Please insert your password.", "OK", "Cancel");
SCM(playerid, COLOR_DGREY, "Invalid Password! Password must be between 6 and 12 characters.");
}
}
}
PHP код:
(25762) : error 035: argument type mismatch (argument 1)
(25764) : error 001: expected token: "]", but found "-identifier-"
(25764) : warning 215: expression has no effect
(25764) : error 001: expected token: ";", but found "]"
(25764) : error 029: invalid expression, assumed zero
Re: inputtext HELP -
Lucky13 - 27.01.2016
Poftim:
Код:
new length = strlen(inputtext);
if(length >= 6 && length <= 12) // (25762)
{
format(PasswordRemember[playerid], 56, inputtext);//(25764)
PlayerTextDrawSetString(playerid, TextdrawPassword[playerid], PasswordRemember[playerid]);
DatePersonale[playerid]++;
}