when compile i get error why? plz help
#1

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;
}
Reply
#2

Post the error.
Reply
#3

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.
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)