npc compile problem
#5

Quote:
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:

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.

Here is what it looks like now.
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;
}

Okay, let's begin
You can't use OnGameModeInit() if you have OnFilterScriptInit() because you're need to use OnGameModeInit() when you creating a gamemode script ONLY
and OnFilterScriptInit() when you creating a filterscript ONLY !

So, now you probably have gamemode, so we will leave OnGameModeInit and delete OnFilterScriptInit

pawn Код:
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;
}
And that's it!
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: 1 Guest(s)