SA-MP Forums Archive
Undefined symbol "playerid" ? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Undefined symbol "playerid" ? (/showthread.php?tid=259075)



Undefined symbol "playerid" ? - lawonama - 02.06.2011

Fixed.


Re: Undefined symbol "playerid" ? - blackwave - 02.06.2011

OnGameModeInit hasn't been forward including playerid, since it's nothing to do, but with Game mode initialization.

Try that:

pawn Код:
public OnGameModeInit()
{

    SetGameModeText("The House V-1");
    AddPlayerClass(79,2287.0859,-1109.5970,37.9766,343.7575,0,0,0,0,0,0); //
    enterh = CreatePickup(1318, 2, 2288.2397, -1104.6602, 38.5949, -1);
    opene = CreatePickup(1239, 2, 2294.51, -1104.25, 817.82, -1);
    SetPlayerWeather(playerid, 9); // Warning number 1
    SendClientMessage(playerid, COLOR_WHITE,"Don't bunny hop! Or you will be kicked/banned!"); // Warning number 2
    return 1;
}



Re: Undefined symbol "playerid" ? - futuretrucker - 02.06.2011

You can't put a code like that in OnGameModeInit. You need to put it in OnPlayerRequestClass or OnPlayerSpawn.

So something like this
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerWeather(playerid, 9); // Warning number 1
        SendClientMessage(playerid, COLOR_WHITE,"Don't bunny hop! Or you will be kicked/banned!"); // Warning number 2
    return 1;
}



Re: Undefined symbol "playerid" ? - omer5198 - 02.06.2011

it is because there is not such thing as "playerid" in the OnGameModeInit public...
just copy those lines and put theme in OnPlayerConnect


Re: Undefined symbol "playerid" ? - lawonama - 02.06.2011

Thanks guys!!! I fixed it.


Re: Undefined symbol "playerid" ? - Norn - 02.06.2011

Quote:
Originally Posted by lawonama
Посмотреть сообщение
Thanks guys!!! I fixed it.
You fixed it or the guys that created the code for you fixed it?


Re: Undefined symbol "playerid" ? - lawonama - 02.06.2011

The guys that created the code for me fixed it.

But I'm not just Copy+Pasting the codes there. I'm trying to learn the errors and don't repeat them again.
Thanks anyways to everyone that helped or wanted to help me!