11.04.2011, 16:06
Well, I got those errors :
This's the script I made, maybe this is what making the problem :
Thank you !
PHP код:
C:\Documents and Settings\gidon\щемзп дтбегд\Windows\pawno\include\Dini.inc(50) : error 017: undefined symbol "fexist"
C:\Documents and Settings\gidon\щемзп дтбегд\Windows\pawno\include\Dini.inc(50) : warning 215: expression has no effect
C:\Documents and Settings\gidon\щемзп дтбегд\Windows\pawno\include\Dini.inc(50) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\gidon\щемзп дтбегд\Windows\pawno\include\Dini.inc(50) : error 029: invalid expression, assumed zero
C:\Documents and Settings\gidon\щемзп дтбегд\Windows\pawno\include\Dini.inc(50) : fatal error 107: too many error messages on one line
PHP код:
if (strcmp("/register", cmdtext, true, 10) == 0)
{
new name[MAX_PLAYER_NAME], file[256], string[128] tmp[256];
GetPlayerName(playerid, name, sizeof(name));
tmp = strtok(cmdtext, idx);
format(file, sizeof(file), SERVER_USER_FILE, name);
if(!dini_Exists(file))
{
SendClientMessage(playerid,COLOR_DONATORGOLD,"You've created account, type /login to log in.");
dini_IntSet(file, "Password", udb_hash(tmp));
dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel] = 0);
dini_IntSet(file, "Money",PlayerInfo[playerid][pCash] = 500);
dini_IntSet(file, "Score",PlayerInfo[playerid][pScore] = 0);
SendClientMessage(playerid,COLOR_DONATORGOLD,"[SYSTEM]: You succesfully registered the nickname %s with password %s, you have been auto logged in");
gPlayerLogged[playerid] = 1;
}
if(fexist(file))
{
SendClientMessage(playerid,COLOR_DONATORGOLD,"This account is already registered!");
}
return 1;
}
if (strcmp("/login", cmdtext, true, 10) == 0)
{
new name[MAX_PLAYER_NAME], file[256], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
new pass;
pass = dini_Int(file, "Password");
if(udb_hash(tmp) != pass)
{
SendClientMessage(playerid, COLOR_RED, "Wrong password");
}
else
{
gPlayerLogged[playerid] = 1;
PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel");
SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
GivePlayerMoney(playerid, dini_Int(file, "Money")-GetPlayerMoney(playerid));
}