Need help with NPC![Nub]
#1

Hello guys,i started a new server for me and my brothers lol,everything is ok but i just tried the 'create a npc' tutorial,i have sum errors,maybe u can help:

Код:
C:\Program Files\gta.sa\GTA San Andreas\gamemodes\lvdm.pwn(280) : error 021: symbol already defined: "OnPlayerSpawn"
C:\Program Files\gta.sa\GTA San Andreas\gamemodes\lvdm.pwn(399) : error 021: symbol already defined: "OnGameModeInit"
C:\Program Files\gta.sa\GTA San Andreas\gamemodes\lvdm.pwn(920) : warning 213: tag mismatch
C:\Program Files\gta.sa\GTA San Andreas\gamemodes\lvdm.pwn(920) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
...Thats what my PAWNCompilerOutput says.

OnGameModeInit is on 2 lines, the NPC one like:
Код:
new MyFirstNPCVehicle;
public OnGameModeInit()
{
  print("lvdm");
  ConnectNPC("Cop","BOT");
  MyFirstNPCVehicle = CreateVehicle(400, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
  return 1;
}
..And the GameMode one:

Код:
public OnGameModeInit()
{
	SetGameModeText("Ventura's DM~MG");

	ShowPlayerMarkers(1);
	ShowNameTags(1);
	EnableStuntBonusForAll(0);
etc...
And i dunno whats the error #1,i didnt edit it:
Код:
public OnPlayerSpawn(playerid)
{
	GivePlayerMoney(playerid, PocketMoney);
	SetPlayerInterior(playerid,0);
	SetPlayerRandomSpawn(playerid);
	TogglePlayerClock(playerid,1);
	return 1;
}
Etc...
Hope you can help!Thanks very much for the answers!!! and sorry im really a NUB
Reply
#2

Quote:
Originally Posted by *******
Hello guys,i started a new server for me and my brothers lol,everything is ok but i just tried the 'create a npc' tutorial,i have sum errors,maybe u can help:

Код:
C:\Program Files\gta.sa\GTA San Andreas\gamemodes\lvdm.pwn(280) : error 021: symbol already defined: "OnPlayerSpawn"
C:\Program Files\gta.sa\GTA San Andreas\gamemodes\lvdm.pwn(399) : error 021: symbol already defined: "OnGameModeInit"
C:\Program Files\gta.sa\GTA San Andreas\gamemodes\lvdm.pwn(920) : warning 213: tag mismatch
C:\Program Files\gta.sa\GTA San Andreas\gamemodes\lvdm.pwn(920) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
...Thats what my PAWNCompilerOutput says.

OnGameModeInit is on 2 lines, the NPC one like:
Код:
new MyFirstNPCVehicle;
public OnGameModeInit()
{
  print("lvdm");
  ConnectNPC("Cop","BOT");
  MyFirstNPCVehicle = CreateVehicle(400, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
  return 1;
}
..And the GameMode one:

Код:
public OnGameModeInit()
{
	SetGameModeText("Ventura's DM~MG");

	ShowPlayerMarkers(1);
	ShowNameTags(1);
	EnableStuntBonusForAll(0);
etc...
About the OnGameModeInit

Delete that NPC one, and put this OnGameModeInit in your script

Код:
new MyFirstNPCVehicle;

public OnGameModeInit()
{
	SetGameModeText("Your Mode");
	ShowPlayerMarkers(1);
	ShowNameTags(1);
	EnableStuntBonusForAll(0);
     ConnectNPC("Cop","BOT");
     MyFirstNPCVehicle = CreateVehicle(400, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
     return 1;
}
and about that OnPlayerSpawn you have 2 Public OnPlayerSpawn copy the lines of 1 OnPlayerSpawn and put it in that other OnPlayerSpawn
Reply
#3

Thank you very much dude,ill try it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)