Few Errors - 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)
+--- Thread: Few Errors (
/showthread.php?tid=312281)
Few Errors -
Jaber_Brown - 20.01.2012
Код:
C:\Documents and Settings\Jaber\Bureau\samp03dsvr_R2_win32\gamemodes\Jaber.pwn(263) : error 012: invalid function call, not a valid address
C:\Documents and Settings\Jaber\Bureau\samp03dsvr_R2_win32\gamemodes\Jaber.pwn(263) : warning 215: expression has no effect
C:\Documents and Settings\Jaber\Bureau\samp03dsvr_R2_win32\gamemodes\Jaber.pwn(263) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Jaber\Bureau\samp03dsvr_R2_win32\gamemodes\Jaber.pwn(263) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Jaber\Bureau\samp03dsvr_R2_win32\gamemodes\Jaber.pwn(263) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Here's the Code
Код:
new PlayerInfo[MAX_PLAYERS][pInfo];
forward OnPlayerRegister(playerid, password[]);
public OnPlayerRegister(playerid, password[])
{
if(IsPlayerConnected(playerid))
{
new string[128];
format(string, sizeof(string), "users/%s.ini", pName(playerid));
if(!dini_Exists(string));
{
dini_Create(string);
dini_Set(string, "Key", password);
dini_IntSet(string, "Cash", PlayerInfo[playerid][pCash]);
dini_IntSet(string, "Level", PlayerInfo[playerid][pLevel]);
dini_IntSet(string, "Account", PlayerInfo[playerid][pAccount]);
dini_IntSet(string, "AdminLevel", PlayerInfo[playerid][pAdmin]);
dini_IntSet(string, "Respect", PlayerInfo[playerid][pExp]);
dini_IntSet(string, "UpgradePoints", PlayerInfo[playerid][gPupgrade]);
dini_IntSet(string, "Kills", PlayerInfo[playerid][pKills]);
dini_FloatSet(string, "pSHealth", PlayerInfo[playerid][pSHealth]);
GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
dini_FloatSet(string, "Health", PlayerInfo[playerid][pHealth]);
Help me Please
Re: Few Errors -
Bogdan1992 - 20.01.2012
Problem was here, if(!dini_Exists(string))
;
PHP код:
new PlayerInfo[MAX_PLAYERS][pInfo];
forward OnPlayerRegister(playerid, password[]);
public OnPlayerRegister(playerid, password[])
{
if(IsPlayerConnected(playerid))
{
new string[128];
format(string, sizeof(string), "users/%s.ini", pName(playerid));
if(!dini_Exists(string))
{
dini_Create(string);
dini_Set(string, "Key", password);
dini_IntSet(string, "Cash", PlayerInfo[playerid][pCash]);
dini_IntSet(string, "Level", PlayerInfo[playerid][pLevel]);
dini_IntSet(string, "Account", PlayerInfo[playerid][pAccount]);
dini_IntSet(string, "AdminLevel", PlayerInfo[playerid][pAdmin]);
dini_IntSet(string, "Respect", PlayerInfo[playerid][pExp]);
dini_IntSet(string, "UpgradePoints", PlayerInfo[playerid][gPupgrade]);
dini_IntSet(string, "Kills", PlayerInfo[playerid][pKills]);
dini_FloatSet(string, "pSHealth", PlayerInfo[playerid][pSHealth]);
GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
dini_FloatSet(string, "Health", PlayerInfo[playerid][pHealth]);
Re : Few Errors -
Jaber_Brown - 20.01.2012
I did that, Still got the error
Re: Few Errors -
Bogdan1992 - 20.01.2012
Show me that 263 line please.
Re : Few Errors -
Jaber_Brown - 20.01.2012
Код:
format(string, sizeof(string), "users/%s.ini", pName(playerid);
Re: Few Errors -
Bogdan1992 - 20.01.2012
Remove the (playerid) if you have a global variable like this. new pName[MAX_PLAYER_NAME];