I am working on a scratch gamemode these days. Need help in fixing these errors:
Код:
C:\Users\HP\Desktop\xw2\gamemodes\XWBeta8.pwn(1297) : warning 217: loose indentation
C:\Users\HP\Desktop\xw2\gamemodes\XWBeta8.pwn(1297) : error 014: invalid statement; not in switch
C:\Users\HP\Desktop\xw2\gamemodes\XWBeta8.pwn(1297) : warning 215: expression has no effect
C:\Users\HP\Desktop\xw2\gamemodes\XWBeta8.pwn(1297) : error 001: expected token: ";", but found ":"
C:\Users\HP\Desktop\xw2\gamemodes\XWBeta8.pwn(1297) : error 029: invalid expression, assumed zero
C:\Users\HP\Desktop\xw2\gamemodes\XWBeta8.pwn(1297) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Код:
case DIALOG_REGISTER: - Line 1297
{
if (!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, ""COL_WHITE"Registering",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
new IP[22];
GetPlayerIp(playerid, IP, sizeof(IP));
new INI:
File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteString(File, "Ip", IP);
INI_WriteInt(File,"Cash",0);
INI_WriteInt(File,"Kills",0);
INI_WriteInt(File,"Deaths",0);
INI_WriteInt(File,"Score",0);
INI_WriteInt(File,"Admin",0);
INI_Close(File);
SendClientMessage(playerid, TOMATO, "[SERVER]: {FFFFFF}You have succesfully registered onto our database. Enjoy.");
}
}
case DIALOG_LOGIN:
{
if ( !response ) return Kick ( playerid );
if( response )
{
if(udb_hash(inputtext) == PInfo[playerid][Pass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, PInfo[playerid][Cash]);
SetPlayerScore(playerid,PInfo[playerid][Score]);
SendClientMessage(playerid, TOMATO, "[SERVER]: {FFFFFF}You have been logged into your account sucessfully.");
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
}
return 1;
}
}
}
return 1;
}
Thanks. fixed.