C:\Users\Davey\Desktop\lulo356.pwn(488) : error 014: invalid statement; not in switch
C:\Users\Davey\Desktop\lulo356.pwn(488) : warning 215: expression has no effect
C:\Users\Davey\Desktop\lulo356.pwn(488) : error 001: expected token: ";", but found ":"
C:\Users\Davey\Desktop\lulo356.pwn(488) : error 029: invalid expression, assumed zero
C:\Users\Davey\Desktop\lulo356.pwn(488) : fatal error 107: too many error messages on one line
case 7000://<==== Error Line
{
if(strval(inputtext) >= 14)
{
new string[128];
sInfo[playerid][Age] = strval(inputtext);
format(string, sizeof(string), "So you are %d years old.", strval(inputtext));
SCM(playerid, WHITE, string);
{
ShowPlayerDialog(playerid, 7001, DIALOG_STYLE_LIST, "Registration -> Sex", "Boy\nGirl", "Select", "Quit");
}
else
{
SendClientMessage(playerid, WHITE, "You are to young enter a new age");
ShowPlayerDialog(playerid, 7000, DIALOG_STYLE_INPUT, "Registration -> Age", "{FFFFFF}Enter your Characters Age\n You can RP as a Teen (age: 14,15,16,17)", "Enter", "");
}
}
C:\Users\Davey\Desktop\lulo356.pwn(450) : error 006: must be assigned to an array
if(dialogid==DIALOG_REGISTER)
{
if(response)
{
new name[MAX_PLAYER_NAME],query[128],passwort[35];
GetPlayerName(playerid,name,sizeof(name));
if(strlen(inputtext)>3)
{
mysql_escape_string(inputtext,passwort,dbhandle);
format(query,sizeof(query),"INSERT INTO user (username,password) VALUES ('%s',MD5('%s')) ",name,passwort);
mysql_function_query(dbhandle,query,false,"","");
new
szBuffer[129];
WP_Hash(szBuffer, sizeof(szBuffer), inputtext);
sInfo[playerid][Password] = szBuffer; //<<========= error line
sInfo[playerid][Health] = 100;
sInfo[playerid][Armour] = 0;
sInfo[playerid][Muted] = 1;
SendClientMessage(playerid, COLOR_WHITE, "Okay, now let's set up your character.");
new rand = random(sizeof(RandomMaleSkins));
sInfo[playerid][Skin] = RandomMaleSkins[rand][0];
SetPlayerVirtualWorld(playerid, playerid+2);
ShowPlayerDialog(playerid, 7000, DIALOG_STYLE_INPUT, "Registration -> Age", "{FFFFFF}Enter your Characters Age\n You can RP as a Teen (age: 14,15,16,17)", "Enter", "");
}
else
{
SendClientMessage(playerid,COLOR_RED,"Your password must be at least 4 characters long.");
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Register","Please, Enter an password below:","Okay","Cancel");
}
}
else
{
Kick(playerid);
}
return 1;
}
switch(...)
{
case 1:
{
}
}
switch(...)
{
}
case 1:
{
}
strins(sInfo[playerid][Password],szBuffer,0);
Hello!
1.) (Your first problem): The case isn't in the switch, e.g.: All right: PHP код:
PHP код:
Try this: PHP код:
|
switch(...)
{
case 1:
{
}
case 2:
{
}
}
switch(...)
{
}
case 1:
{
}
case 2:
{
}
Ok, I try it but my english isn't good..
The case-clause have to be in the switch-clause This is right: PHP код:
PHP код:
|