npc compile problem
#9

i did that and i get
Quote:

C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc1.pwn(1323) : error 021: symbol already defined: "OnGameModeInit"
C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc1.pwn(1329) : error 055: start of function body without function header
C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc1.pwn(1332) : error 010: invalid function or declaration
C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc1.pwn(1336) : error 021: symbol already defined: "OnGameModeInit"
C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc1.pwn(1572) : error 021: symbol already defined: "OnPlayerSpawn"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.

script
Quote:

public OnGameModeInit()
{
print("SAGC");
ConnectNPC("ROBERT","mynpc");
return 1;
}
//public OnFilterScriptInit()
{
print("scriptfiles");
ConnectNPC("ROBERT","mynpc");
return 1;
}
new MyFirstNPCVehicle; //Global variable!
public OnGameModeInit()
{
print("SAGC");
ConnectNPC("ROBERT","mynpc");
MyFirstNPCVehicle = CreateVehicle(420,1536.6427,-841.7883,64.4755,266.3878,6,1, 5000);
return 1;
}
public OnPlayerSpawn(playerid)
{
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, "ROBERT", 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;
}

you guys keep saying take out OnFilterScriptInit but its actualy making it worse it's gota be somthing ells ben trying to fix it all day lol
Reply


Messages In This Thread
npc compile problem - by rtydrtyd - 17.10.2009, 22:56
Re: npc compile problem - by Luka P. - 17.10.2009, 23:08
Re: npc compile problem - by rtydrtyd - 17.10.2009, 23:19
Re: npc compile problem - by rtydrtyd - 17.10.2009, 23:37
Re: npc compile problem - by Luka P. - 17.10.2009, 23:42
Re: npc compile problem - by rtydrtyd - 17.10.2009, 23:54
Re: npc compile problem - by rtydrtyd - 18.10.2009, 00:00
Re: npc compile problem - by Beaver07 - 18.10.2009, 01:50
Re: npc compile problem - by rtydrtyd - 18.10.2009, 02:35
Re: npc compile problem - by rtydrtyd - 18.10.2009, 03:34

Forum Jump:


Users browsing this thread: 2 Guest(s)