C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc.pwn(1322) : error 021: symbol already defined: "ConnectNPC" C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc.pwn(1324) : error 021: symbol already defined: "OnGameModeInit" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. |
ConnectNPC("ROBERT","mynpc"); public OnGameModeInit() { print("SAGC"); ConnectNPC("ROBERT","mynpc"); return 1; } |
Originally Posted by rtydrtyd
wen i try to compile my script with the npc stuff i get
Quote:
Quote:
|
public OnGameModeInit()
{
print("SAGC");
ConnectNPC("ROBERT","mynpc");
return 1;
}
C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc.pwn(1336) : error 021: symbol already defined: "OnGameModeInit" C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc.pwn(1339) : warning 204: symbol is assigned a value that is never used: "MyFirstNPCVehicle" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
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; } |
Originally Posted by rtydrtyd
Ok yeah i have a nother problem, i now i cant delete the 2nd OnGameModeInit so what exactly do i do to fix it lol i need to learn how to scrip :P
Quote:
Quote:
|
new MyFirstNPCVehicle;
public OnGameModeInit()
{
print("SAGC");
ConnectNPC("ROBERT","mynpc");
MyFirstNPCVehicle = CreateVehicle(420,1536.6427,-841.7883,64.4755,266.3878,6,1, 5000);
return 1;
}
C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc.pwn(1330) : error 055: start of function body without function header C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc.pwn(1333) : error 010: invalid function or declaration C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc.pwn(1337) : error 021: symbol already defined: "OnGameModeInit" C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc.pwn(1573) : error 021: symbol already defined: "OnPlayerSpawn" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
{ 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; } and if i take |
{ print("scriptfiles"); ConnectNPC("ROBERT","mynpc"); return 1; } |
C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc.pwn(1329) : error 054: unmatched closing brace ("}") C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc.pwn(1332) : error 021: symbol already defined: "OnGameModeInit" C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc.pwn(156 ![]() Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors. |
//public OnFilterScriptInit() { print("scriptfiles"); ConnectNPC("ROBERT","mynpc"); return 1; } |
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. |
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; } |
C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc1.pwn(1324) : error 021: symbol already defined: "OnGameModeInit" C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc1.pwn(1331) : error 021: symbol already defined: "OnGameModeInit" C:\Users\john\Desktop\Desktop files\0.3\gamemodes\sagc1.pwn(1567) : error 021: symbol already defined: "OnPlayerSpawn" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors. |
//ConnectNPC("Robert","mynpc"); public OnGameModeInit() { print("sagc1"); ConnectNPC("Robert","mynpc"); return 1; } new MyFirstNPCVehicle; public OnGameModeInit() { print("sagc1"); 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)) { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); if(!strcmp(npcname, "Robert", true)) { PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0); } return 1; } return 1; } |