SetTimer("AreaCheck", 1000, 1); // The function AreaCheck(); { for(new i=0; i<MAX_PLAYERS; i++ ) { if(IsPlayerConnected(i) && IsPlayerInArea(i, 1097.29, 1177.29, 1204.25, 1354.55) && !IsPlayerAdmin(i)) // CHECK: If the player is a admin, if the player is in the area { // He's not. SendClientMessage(i, YOURCOLOR, "You are not allowed to enter the ADMIN area."); /* Do with him whatever you want */ } } }
C:\Documents and Settings\Admin\Рабочий стол\Сервер 0.3с тест (новый)\gamemodes\uchiha_drift.pwn(884) : error 029: invalid expression, assumed zero C:\Documents and Settings\Admin\Рабочий стол\Сервер 0.3с тест (новый)\gamemodes\uchiha_drift.pwn(884) : error 001: expected token: ")", but found ";" C:\Documents and Settings\Admin\Рабочий стол\Сервер 0.3с тест (новый)\gamemodes\uchiha_drift.pwn(889) : error 029: invalid expression, assumed zero C:\Documents and Settings\Admin\Рабочий стол\Сервер 0.3с тест (новый)\gamemodes\uchiha_drift.pwn(889) : warning 215: expression has no effect C:\Documents and Settings\Admin\Рабочий стол\Сервер 0.3с тест (новый)\gamemodes\uchiha_drift.pwn(889) : error 001: expected token: ";", but found ")" C:\Documents and Settings\Admin\Рабочий стол\Сервер 0.3с тест (новый)\gamemodes\uchiha_drift.pwn(889) : error 029: invalid expression, assumed zero C:\Documents and Settings\Admin\Рабочий стол\Сервер 0.3с тест (новый)\gamemodes\uchiha_drift.pwn(889) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.
public OnGameModeInit( )
{
// current code
SetTimer( "AreaCheck", 1000, 1 );
return 1;
}
forward AreaCheck;
public OnGameModeInit( ) { SetTimer( "AreaCheck", 1000, 1 ); return 1; }
public AreaCheck(); { for(new i=0; i<MAX_PLAYERS; i++ ) { if(IsPlayerConnected(i) && IsPlayerInArea(i, 1097.29, 1177.29, 1204.25, 1354.55) && !IsPlayerAdmin(i)) // CHECK: If the player is a admin, if the player is in the area { // He's not. SendClientMessage(i, YOURCOLOR, "You are not allowed to enter the ADMIN area."); /* Do with him whatever you want */ } } }
There's nothing wrong with the code you presented there. My assumption would be you didn't place the SetTimer function into a callback/function of it's own. I would guess that it should be placed under OnGameMode/FilterScriptInit callback.
pawn Код:
|
SetTimer( "AreaCheck", 1000, 1 );
ow and the
Код:
SetTimer( "AreaCheck", 1000, 1 ); |
Thank you for being VERY descriptive in your response.
Seriously, how can you expect me to assist you further based on that response? What do you mean by 'that didn't help'? Did you save and compile? Was the function already somewhere else? When (if) you moved it, did you delete the other one? Come on... Also show the lines of code the errors are on. |
public AreaCheck(); // <----
{
}