when compile i get error why? plz help - 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: when compile i get error why? plz help (
/showthread.php?tid=110509)
when compile i get error why? plz help -
Sfinx_17 - 26.11.2009
why i get erorrs when compile this code?
pawn Код:
{
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "MyFirstNPC", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0); //Putting the NPC into the vehicle we created for it.
}
return 1;
}
//Other stuff for normal players goes here!
return 1;
}
Re: when compile i get error why? plz help -
Devine - 26.11.2009
Post the error.
Re: when compile i get error why? plz help -
Sfinx_17 - 26.11.2009
check this
Код:
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(218) : warning 225: unreachable code
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(224) : error 017: undefined symbol "MyFirstNPCVehicle"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: when compile i get error why? plz help -
dugi - 27.11.2009
If you'll keep relying on others you will never learn, read the pawn documentation and search for those errors:
http://compuphase.com/pawn/pawn.htm#DOWNLOAD_DOCS and also check other the NPC tutorial again.