SA-MP Forums Archive
symbol already defined - 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)
+--- Thread: symbol already defined (/showthread.php?tid=608795)



symbol already defined - AhmedElGaml - 05.06.2016

How to fix in pawno : if I added
RemoveBuildingForPlayer(........);
and compile it says symbol already defined , how to fix this ?


Re: symbol already defined - WhiteGhost - 05.06.2016

U have the code already.


Re: symbol already defined - Onfroi - 05.06.2016

Are you using it in OnPlayerConnect?


Re: symbol already defined - Crayder - 05.06.2016

Quote:
Originally Posted by Onfroi
Посмотреть сообщение
Are you using it in OnPlayerConnect?
No, he's obviously not...

You must use it in a body. If you don't know what a body is, learn how to code.

So basically, as Onfroi said, RemoveBuildingForPlayer is typically used in OnPlayerConnect. Here is how:
pawn Код:
// Specify the callback's name, it's already forwarded for you in a_samp.inc
public OnPlayerConnect(playerid)
{ // Start a body
    //Remove the building
    RemoveBuildingForPlayer(playerid, bleh....);
    //return 1 in OnPlayerConnect
    return 1;
} // End the body