A bit help with dini !:D! - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: A bit help with dini !:D! (
/showthread.php?tid=247971)
A bit help with dini !:D! -
Ben7544 - 11.04.2011
Well, I got those errors :
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
This's the script I made, maybe this is what making the problem :
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));
}
Thank you !
Re: A bit help with dini !:D! -
Jochemd - 11.04.2011
Try updating your dini-include, it's seems to be fucked up.
Or have you changed file.inc? Update that one to (with the one in the SAMP package).
Re: A bit help with dini !:D! -
Ben7544 - 11.04.2011
Amm, In samp package there isn't dini.inc :O.
Would you give the include please?