11.07.2018, 12:51
Sup guys hope you good! , im new in this lenguage pawn and right now im making a server roleplay from 0 and im trying to make a cmd for player when they got over 10 minutes afk the server get kick the player but if you're admin never kicks you no matter the time the admin got afk. i have this what i see on tutorials and something...
and this are my errors:
can you give me a hand please?
PHP код:
public IdleKick()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] < 1)
{
GetPlayerPos(i, PlayerPos[i][0], PlayerPos[i][1], PlayerPos[i][2]);
if(PlayerPos[i][0] == PlayerPos[i][3] && PlayerPos[i][1] == PlayerPos[i][4] && PlayerPos[i][2] == PlayerPos[i][5])
{
SendClientMessage(i, COLOR_FAILED, " You have been kicked from the server for being AFK over 10 continous minutes");
Kick(i);
}
PlayerPos[i][3] = PlayerPos[i][0];
PlayerPos[i][4] = PlayerPos[i][1];
PlayerPos[i][5] = PlayerPos[i][2];
}
}
}
}
Код HTML:
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(2231) : warning 235: public function lacks forward declaration (symbol "IdleKick") C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(2239) : error 017: undefined symbol "PlayerPos" C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(2239) : warning 215: expression has no effect C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(2239) : error 001: expected token: ";", but found "]" C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(2239) : error 029: invalid expression, assumed zero C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(2239) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.