09.09.2014, 23:27
pawn Код:
CMD:glogin(playerid,params[])
{
if (PlayerInfo[playerid][LoggedIn] == 1) return SendClientMessage(playerid,COLOR_RED,"ACCOUNT: You are already logged in.");
if (!udb_Exists(PlayerName2(playerid))) return SendClientMessage(playerid,COLOR_RED,"ACCOUNT: Account doesn't exist, please use '/gregister [password]'.");
if (strlen(params)==0) return SendClientMessage(playerid,COLOR_RED,"ACCOUNT: Correct usage: '/glogin [password]'")
if (udb_CheckLogin(PlayerName2(playerid),params))
{
new file[256], tmp3[100], string[128], lname[MAX_PLAYER_NAME];
GetPlayerName(playerid,lname,sizeof(lname));
format(file,sizeof(file),"/ladmin/users/%s.sav",udb_encode(lname));
GetPlayerIp(playerid,tmp3,100);
dini_Set(file,"ip",tmp3);
LoginPlayer(playerid);
LoadPlayer(playerid);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
if(PlayerInfo[playerid][Level] > 0) {
format(string,sizeof(string),"ACCOUNT: Successfully Logged In. (Level %d)", PlayerInfo[playerid][Level] );
return SendClientMessage(playerid,green,string);
} else return SendClientMessage(playerid,green,"ACCOUNT: Successfully Logged In");
}
return SendClientMessage(playerid,COLOR_RED,"ACCOUNT: Login failed! Incorrect Password");
}
pawn Код:
C:\Users\Kimo Computer\Desktop\Theskiller\gamemodes\SX[V1].pwn(17003) : warning 202: number of arguments does not match definition
C:\Users\Kimo Computer\Desktop\Theskiller\gamemodes\SX[V1].pwn(17083) : error 001: expected token: ";", but found "if"
C:\Users\Kimo Computer\Desktop\Theskiller\gamemodes\SX[V1].pwn(17083) : error 029: invalid expression, assumed zero
C:\Users\Kimo Computer\Desktop\Theskiller\gamemodes\SX[V1].pwn(17083) : error 001: expected token: ";", but found ")"
C:\Users\Kimo Computer\Desktop\Theskiller\gamemodes\SX[V1].pwn(17083) : fatal error 107: too many error messages on one line