1 error how to fix? - 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: 1 error how to fix? (
/showthread.php?tid=150522)
1 error how to fix? -
hardstop - 26.05.2010
Код:
error 017: undefined symbol "giveplayerid"
and the line what error is is :
if(IsPlayerConnected(playerid) && IsPlayerConnected(giveplayerid))
Re: 1 error how to fix? -
aircombat - 26.05.2010
well i guess that's a copied command from another fs/gm and u didn't copy the giveplayerid code , anyways show the whole command and maybe i'll help
Re: 1 error how to fix? -
¤Adas¤ - 26.05.2010
The code?
Re: 1 error how to fix? -
hardstop - 26.05.2010
here is this command
and i used this TUT: http://forum.sa-mp.com/index.php?topic=120757.0
and i dont have it defined i dont know exactly what to define because new giveplayerid; wont work
Код:
if(strcmp(cmd, "/destroyhouse", true) == 0) //by Darren Reeder( Mowgli / Personalcomputernerd )
{
if(IsPlayerConnected(playerid) && IsPlayerConnected(giveplayerid))
{
if(PlayerInfo[playerid][pAdmin] <= 0) return SendClientMessage(playerid,COLOR_RED," You are not authorized to use this command!");
new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
SendClientMessage(playerid, COLOR_GREY, "USAGE: /destroyhouse [playerid/PartOfName]");
return 1;
}
if(GetPlayerInterior(giveplayerid) != 0) return SendClientMessage(playerid,COLOR_GREY, "Make sure the player is out of their house!");
else
PlayerInfo[giveplayerid][pHouseX] = 0;
PlayerInfo[giveplayerid][pHouseY] = 0;
PlayerInfo[giveplayerid][pHouseZ] = 0;
PlayerInfo[giveplayerid][pHouseVW] = 0;
PlayerInfo[giveplayerid][pHouseIntX] = 0;
PlayerInfo[giveplayerid][pHouseIntY] = 0;
PlayerInfo[giveplayerid][pHouseIntZ] = 0;
PlayerInfo[giveplayerid][pHouseInt] = 0;
PlayerInfo[giveplayerid][pHouseCarX] = 0;
PlayerInfo[giveplayerid][pHouseCarY] = 0;
PlayerInfo[giveplayerid][pHouseCarZ] = 0;
PlayerInfo[giveplayerid][pHouseCarAngle] = 0;
PlayerInfo[giveplayerid][pHouseLevel] = 0;
PlayerInfo[giveplayerid][pHouseSpawn] = 0;
PlayerInfo[giveplayerid][pGotEntrance] = 0;
PlayerInfo[giveplayerid][pGotCar] = 0;
PlayerInfo[giveplayerid][pOwnsHouse] = 0;
new carid = playercarid[playerid];
DestroyVehicle(carid);
SendClientMessage(playerid,COLOR_GREY," You have successfully destroyed a house!");
return 1;
}
SendClientMessage(playerid,COLOR_GREY," Invalid ID/Name!");
return 1;
}
Re: 1 error how to fix? -
Anthony_Brassi - 26.05.2010
change giveplayerid to playerid