Erro in Script
#1

is the following staff was stirring in the script of my server and modified some phrases that appear at the top it automatically at compile time that I gave this error...

Код:
(17358) : error 029: invalid expression, assumed zero
(17358) : warning 215: expression has no effect
(17358) : error 001: expected token: ";", but found ")"
(17358) : error 029: invalid expression, assumed zero
(17358) : fatal error 107: too many error messages on one line
That and the part that is the line 17358


Код:
PlayerAfkTicks[i] ++;
}
else
{
PlayerAfkTicks[i] = 0;
}
PlayerLastPos[i][LastX] = PlayerCurrentPos[0];
PlayerLastPos[i][LastY] = PlayerCurrentPos[1];
PlayerLastPos[i][LastZ] = PlayerCurrentPos[2];

if(PlayerAfkTicks[i] == MAX_IDLE_TIME*60) //this line
{
AFK[i]= 1;
SendClientMessage(i, 0x11B1FFAA, "Vocк foi impedido de upar!");
SetPlayerVirtualWorld(i, 1);
SetCameraBehindPlayer(i);
TogglePlayerControllable(i,0);
TextDrawShowForPlayer(i,AfkText);
TextDrawShowForPlayer(i,AfkBackText);
}
heeeeelp me pleas..
Reply
#2

Could you try this:
pawn Код:
new maxtime = floatround((MAX_IDLE_TIME * 60), floatround_ceil);
if(PlayerAfkTicks[i] >= maxtime)
Reply
#3

and now
Код:
(17358) : error 029: invalid expression, assumed zero
(17358) : error 029: invalid expression, assumed zero
Код:
PlayerAfkTicks[i] ++;
}
else
{
PlayerAfkTicks[i] = 0;
}
PlayerLastPos[i][LastX] = PlayerCurrentPos[0];
PlayerLastPos[i][LastY] = PlayerCurrentPos[1];
PlayerLastPos[i][LastZ] = PlayerCurrentPos[2];

new maxtime = floatround((MAX_IDLE_TIME * 60), floatround_ceil);
if(PlayerAfkTicks[i] >= maxtime)
{
AFK[i]= 1;
SendClientMessage(i, 0x11B1FFAA, "Vocк foi impedido de upar!");
SetPlayerVirtualWorld(i, 1);
SetCameraBehindPlayer(i);
TogglePlayerControllable(i,0);
TextDrawShowForPlayer(i,AfkText);
TextDrawShowForPlayer(i,AfkBackText);
}
Reply
#4

That's weird, it works fine for me. Here's what I have:
pawn Код:
#define     MAX_IDLE_TIME       15 // 15 minutes

new PlayerAfkTicks[MAX_PLAYERS];
new AFK[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    PlayerAfkTicks[playerid] = 0;
    AFK[MAX_PLAYERS];
    return 1;
}

public OnGameModeInit()
{
    SetTimer("OneSecond", 1000, 1);
    return 1;
}

forward OneSecond();
public OneSecond()
{
    for(new x = 0; x < MAX_PLAYERS; x++)
    {
        new maxtime = floatround((MAX_IDLE_TIME * 60), floatround_ceil);
        if(PlayerAfkTicks[x] >= maxtime)
        {
            AFK[x] = 1;
        }
    }
    return 1;
}
Reply
#5

Quote:
Originally Posted by Eyce
Посмотреть сообщение
That's weird, it works fine for me. Here's what I have:
pawn Код:
#define     MAX_IDLE_TIME       15 // 15 minutes

new PlayerAfkTicks[MAX_PLAYERS];
new AFK[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    PlayerAfkTicks[playerid] = 0;
    AFK[MAX_PLAYERS];
    return 1;
}

public OnGameModeInit()
{
    SetTimer("OneSecond", 1000, 1);
    return 1;
}

forward OneSecond();
public OneSecond()
{
    for(new x = 0; x < MAX_PLAYERS; x++)
    {
        new maxtime = floatround((MAX_IDLE_TIME * 60), floatround_ceil);
        if(PlayerAfkTicks[x] >= maxtime)
        {
            AFK[x] = 1;
        }
    }
    return 1;
}
now
Код:
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
error 017: undefined symbol "CPS_AddCheckpoint"
Reply
#6

You don't have to copy the exact same script that I have, it must be incorporated in your script. I could fix it up for you, send me a private message.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)