Help ERROR - 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: Help ERROR (
/showthread.php?tid=573025)
Help ERROR -
SHFaCeBook - 03.05.2015
Hello
what wrong here?
Error:
Код:
(6602) : error 012: invalid function call, not a valid address
(6602) : warning 215: expression has no effect
6602) : error 001: expected token: ";", but found ")"
(6602) : error 029: invalid expression, assumed zero
(6602) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
code
Код:
if(PlayerInfo[playerid][pAdmin] > 0 && dostup[playerid] == 1)
{
dostup[playerid] = 0;
format(string, sizeof(string), "<ALogin Off> %s[%d] вышел из игры [lvl:%d]",pNormalName(playerid),playerid,PlayerInfo[playerid][pAdmin]);
ABroadCast(0xF4B800AA, string, 1);
}
this line of error :
Код:
format(string, sizeof(string), "<ALogin Off> %s[%d] вышел из игры [lvl:%d]",pNormalName(playerid),playerid,PlayerInfo[playerid][pAdmin]);
Was before,in other gm compile norm:
Код:
format(string, sizeof(string), "<ALogin Off> %s[%d] вышел из игры [lvl:%d]",Name(playerid),playerid,PlayerInfo[playerid][pAdmin]);
Re: Help ERROR -
Konstantinos - 03.05.2015
pNormalName is an not a function but a variable. It has to be an array and it must be like:
pawn Код:
new pNormalName[MAX_PLAYERS][MAX_PLAYER_NAME];
Also change to:
in the format.
You're supposed to get the name on connect and store it (assuming you already do, but anyway):
pawn Код:
// OnPlayerConnect:
GetPlayerName(pNormalName[playerid], playerid, MAX_PLAYER_NAME);
Re: Help ERROR -
SHFaCeBook - 03.05.2015
FIXED.
Re: Help ERROR -
SHFaCeBook - 03.05.2015
Bump!
Re: Help ERROR -
Joe Staff - 03.05.2015
Show the whole function, you may have a missing bracket some place.
Re: Help ERROR -
SHFaCeBook - 03.05.2015
i solved problem!
Thanks.