SA-MP Forums Archive
Having Problem in Zcmd - 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: Having Problem in Zcmd (/showthread.php?tid=362549)



Having Problem in Zcmd - Morkano - 24.07.2012

Quote:

D:\Server\gamemodes\gs.pwn(2273) : error 017: undefined symbol "PlayerInfo"
D:\Server\gamemodes\gs.pwn(2273) : warning 215: expression has no effect
D:\Server\gamemodes\gs.pwn(2273) : error 001: expected token: ";", but found "]"
D:\Server\gamemodes\gs.pwn(2273) : error 029: invalid expression, assumed zero
D:\Server\gamemodes\gs.pwn(2273) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Problem in gamemode
2273 Line
Quote:

if(PlayerInfo[playerid][pAdmin] >= 5)




Re: Having Problem in Zcmd - Rudy_ - 24.07.2012

pawn Код:
enum pInfo
{
    pAdmin
}

new
    PlayerInfo[ MAX_PLAYERS ][ pInfo ];
pawn Код:
if(pInfo[playerid][pAdmin] >= 5)
Код:
[Fu]This forum requires that you wait 120 seconds between posts. Please try again in 50 seconds.[Fu]



Re: Having Problem in Zcmd - [IKS]Niko_Hs™ - 24.07.2012

You did not put the variable PlayerInfo..

Try with this code :

Код:
enum pData
{
pAdmin
}

new PlayerInfo[MAX_PLAYERS][pData];



Re: Having Problem in Zcmd - Morkano - 24.07.2012

thank you


Re: Having Problem in Zcmd - Devilxz97 - 24.07.2012

use
pawn Код:
enum pInfo
{
     pAdmin
}
new PlayerInfo[MAX_PLAYERS][pInfo];

//example

CMD:blabla(playerid, params[])
{
     if(PlayerInfo[playerid][pAdmin] >= 6)
     {
     //your code
     }
     return 1;
}