SA-MP Forums Archive
RemoveBuildingForPlayer Problem - 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: RemoveBuildingForPlayer Problem (/showthread.php?tid=452413)



RemoveBuildingForPlayer Problem - Seifspeed - 21.07.2013

I wanted to delete the objects below but when i compile it said:
D:\Users\Seif\Desktop\Raven's Roleplay\gamemodes\larp.pwn(23222) : error 017: undefined symbol "playerid"
D:\Users\Seif\Desktop\Raven's Roleplay\gamemodes\larp.pwn(23223) : error 017: undefined symbol "playerid"
D:\Users\Seif\Desktop\Raven's Roleplay\gamemodes\larp.pwn(23224) : error 017: undefined symbol "playerid"
D:\Users\Seif\Desktop\Raven's Roleplay\gamemodes\larp.pwn(23225) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

i wanted to delete these objects:
RemoveBuildingForPlayer(playerid, 5967, 1259.4375, -1246.8125, 17.1094, 0.25);
RemoveBuildingForPlayer(playerid, 1391, 1238.3750, -1258.2734, 44.6641, 0.25);
RemoveBuildingForPlayer(playerid, 1294, 1254.6875, -1276.1641, 17.0781, 0.25);
RemoveBuildingForPlayer(playerid, 5857, 1259.4375, -1246.8125, 17.1094, 0.25);

Please tell me the steps how to define it.
And Thank you!


Re: RemoveBuildingForPlayer Problem - Elie1996 - 21.07.2013

Can you tell me where you're putting that code in?


AW: RemoveBuildingForPlayer Problem - BigETI - 21.07.2013

You can put those for example under OnPlayerConnect()


Re: RemoveBuildingForPlayer Problem - Seifspeed - 21.07.2013

i am putting on ongamemodeinit .


Re: RemoveBuildingForPlayer Problem - Seifspeed - 21.07.2013

i tried it on OnPlayerConnect() it says:

D:\Users\Seif\Desktop\Raven's Roleplay\gamemodes\larp.pwn(630 : error 021: symbol already defined: "RemoveBuildingForPlayer"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


Re: RemoveBuildingForPlayer Problem - [WSF]ThA_Devil - 21.07.2013

You can't really use it there, because it requires playerid parameter.
Which is found in callbacks like OnPlayerConnect, OnPlayerRequestClass, OnPlayerSpawn and others.
Edit: If you have a loop then yes, you can do it under OnGameModeInit


Re: RemoveBuildingForPlayer Problem - Seifspeed - 21.07.2013

At first i posted it on ongamemodeinit it said:
D:\Users\Seif\Desktop\Raven's Roleplay\gamemodes\larp.pwn(23222) : error 017: undefined symbol "playerid"
D:\Users\Seif\Desktop\Raven's Roleplay\gamemodes\larp.pwn(23223) : error 017: undefined symbol "playerid"
D:\Users\Seif\Desktop\Raven's Roleplay\gamemodes\larp.pwn(23224) : error 017: undefined symbol "playerid"
D:\Users\Seif\Desktop\Raven's Roleplay\gamemodes\larp.pwn(23225) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Then i posted it on onplayerconnect it said:

D:\Users\Seif\Desktop\Raven's Roleplay\gamemodes\larp.pwn(630 : error 021: symbol already defined: "RemoveBuildingForPlayer"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Did i do something wrong didnt include something or define something?
i have this line on a_players:
native RemoveBuildingForPlayer(playerid, modelid, Float:fX, Float:fY, Float:fZ, Float:fRadius);
What else should i do?
And Whats a LOOP?


Re: RemoveBuildingForPlayer Problem - [WSF]ThA_Devil - 21.07.2013

oh, I think that you have tto remove that native from that script since it comes with a_samp, that's why it's already defined since they are conflicting with each other.
Loop:http://en.wikipedia.org/wiki/For_loop


Re: RemoveBuildingForPlayer Problem - Seifspeed - 21.07.2013

I have deleted the
native RemoveBuildingForPlayer(playerid, modelid, Float:fX, Float:fY, Float:fZ, Float:fRadius);
From my A_player and added it to a_samp
then pasted the removebuildingforplayer onplayerconnect()
it still says:
D:\Users\Seif\Desktop\Raven's Roleplay\gamemodes\larp.pwn(630 : error 021: symbol already defined: "RemoveBuildingForPlayer"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


AW: Re: RemoveBuildingForPlayer Problem - BigETI - 21.07.2013

Quote:
Originally Posted by Seifspeed
Посмотреть сообщение
I have deleted the
native RemoveBuildingForPlayer(playerid, modelid, Float:fX, Float:fY, Float:fZ, Float:fRadius);
From my A_player and added it to a_samp
then pasted the removebuildingforplayer onplayerconnect()
it still says:
D:\Users\Seif\Desktop\Raven's Roleplay\gamemodes\larp.pwn(630 : error 021: symbol already defined: "RemoveBuildingForPlayer"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
First of all there is already RemoveBuldingForPlayer defined in YOUR OWN script, search for it in YOUR OWN script for the re-definition. Do NOT edit pre-made includes (obviosly those from the server package), because doing so is a bad idea. You have to use it in OnPlayerConnect, because it has to affect on the player, who is connecting to your server. If you put it into a loop under OnGameModeInit, you'll obviosly not be able to remove objects.