[HELP] NPC SYSTEM
#1

Hi, I want to make a system where you do a command and BOT boat comes to me, and deliver a box ...

I've recorded and, now tou trying to play on command, but it gives me the following errors:


Код:
C:\Users\Utilizador\Desktop\XFUSION Gamemode\XF\gamemodes\DL-RP.pwn(6871) : error 021: symbol already defined: "readaction"
C:\Users\Utilizador\Desktop\XFUSION Gamemode\XF\gamemodes\DL-RP.pwn(6872) : error 017: undefined symbol "StartRecordingPlayback"
C:\Users\Utilizador\Desktop\XFUSION Gamemode\XF\gamemodes\DL-RP.pwn(6876) : error 021: symbol already defined: "OnNPCSpawn"
C:\Users\Utilizador\Desktop\XFUSION Gamemode\XF\gamemodes\DL-RP.pwn(6882) : error 021: symbol already defined: "OnRecordingPlayBackEnd"
C:\Users\Utilizador\Desktop\XFUSION Gamemode\XF\gamemodes\DL-RP.pwn(6887) : error 021: symbol already defined: "OnNPCExitVehicle"
C:\Users\Utilizador\Desktop\XFUSION Gamemode\XF\gamemodes\DL-RP.pwn(6888) : error 017: undefined symbol "StopRecordingPlayback"
C:\Users\Utilizador\Desktop\XFUSION Gamemode\XF\gamemodes\DL-RP.pwn(44079) : error 017: undefined symbol "StartRecordingPlayback"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
PS: I've tried updating and includes the error persists. I also have the # include <a_npc> in gamemode.
The code is:


Код:
readaction()
{
   StartRecordingPlayback(1,"armas");
}

public:OnNPCSpawn()
{
   readaction();

}

public:OnRecordingPlayBackEnd()
{
   readaction();
}

public:OnNPCExitVehicle()
{
    StopRecordingPlayback();
}
and i have the command:

Код:
		if(strcmp(cmd,"/bot",true)==0)
		{
		    if(IsPlayerConnected(playerid))
		    {
		        if (PlayerInfo[playerid][pFaction] != 4)
				{
				    format(string, sizeof(string), "*{FF0000} Erro:{FFFFFF} Nao pertences as %s.", DynamicFactions[4][fName]);
				    return 1;
				}
				else
				{
			        SendClientMessage(playerid, COLOR_WHITE, "Ai vem o Bot! Test!");
			        StartRecordingPlayback(1,"armas");
					return 1;
				}
			}
			return 1;
		}
Reply
#2

It would really help if you didn't have so much code spammed into one file what a pain in the ass to edit. It's really impossible to tell the issue at this point I could only postulate your probably missing a brace somewhere { }
Reply
#3

I am guessing your trying to put this in your gamemode, but I think this should be compiled into the npcmodes folder, correct me if I'm wrong.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)