Filterscript gives error 017
#1

Basically, I made a function to go with my timer, and it keeps giving me (error 017: undefined symbol "playerid")

pawn Код:
forward UnFreezePlayer();
public UnFreezePlayer()
{
    TogglePlayerControllable(playerid, true);
    SendClientMessage(playerid, COLOR_GREEN, "[INFO:] Pole has been fixed, You may now move to the next one.");
    return 1;
}

The line that the timer uses the above function:
pawn Код:
case 1: { DisablePlayerCheckpoint(playerid); SendClientMessage(playerid, COLOR_WHITE, "[INFO:] You set down your toolbox and started to fix the pole."); TogglePlayerControllable(playerid, false); SetTimer("UnFreezePlayer", 4000, false); TechStatus[playerid]++; SetPlayerCheckpoint(playerid, 1467.8677,164.2824,28.0951, 2); } // 2 cp
I would really appreciate the fast help.
Reply
#2

new playerid;
pawn Код:
forward UnFreezePlayer();
public UnFreezePlayer()
{
    new playerid;
    TogglePlayerControllable(playerid, true);
    SendClientMessage(playerid, COLOR_GREEN, "[INFO:] Pole has been fixed, You may now move to the next one.");
    return 1;
}
Reply
#3

pawn Код:
forward UnFreezePlayer(playerid);
public UnFreezePlayer(playerid)
{
    TogglePlayerControllable(playerid, true);
    SendClientMessage(playerid, COLOR_GREEN, "[INFO:] Pole has been fixed, You may now move to the next one.");
    return 1;
}
Reply
#4

Cheers, worked.
thanks for both ways, repped.
Reply
#5

Or
pawn Код:
forward UnFreezePlayer(playerid);
public forward UnFreezePlayer(playerid)
{
EDIT:2late
Reply
#6

use this
pawn Код:
new playerid [MAX_PLAYER_NAME];

forward UnFreezePlayer();
public UnFreezePlayer()
{
    new playerid;
    TogglePlayerControllable(playerid, true);
    SendClientMessage(playerid, COLOR_GREEN, "[INFO:] Pole has been fixed, You may now move to the next one.");
    return 1;
}
Reply
#7

Quote:
Originally Posted by xMCx
Посмотреть сообщение
pawn Код:
forward UnFreezePlayer(playerid);
public UnFreezePlayer(playerid)
{
    TogglePlayerControllable(playerid, true);
    SendClientMessage(playerid, COLOR_GREEN, "[INFO:] Pole has been fixed, You may now move to the next one.");
    return 1;
}
@ OP: above code is the only one that will give you the desired results. Creating a playerid variable out of the blue will only work for ID0 and the code above will give you a hell of a lot of errors.
Reply
#8

Quote:
Originally Posted by newbienoob
Посмотреть сообщение
Or
pawn Код:
forward UnFreezePlayer(playerid);
public forward UnFreezePlayer(playerid)
{
EDIT:2late
Well this function works fine for him but the " playerid " was not defined : so for that i'v said what to do :
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)