SA-MP Forums Archive
NPC Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: NPC Problem (/showthread.php?tid=277442)



NPC Problem - Rock_Ro - 17.08.2011

Hello everyone.

Today i've tried to add one NPC to my server but i have some problems when i try to compile.

The "a_npc" include it loads but not the functions..
When i compile i get error about undefined symbol and function must be forwarded..blabla..

What the problem could be?


Re: NPC Problem - RoamPT - 17.08.2011

You could start by showing us the line u have the error.


Re: NPC Problem - Rock_Ro - 18.08.2011

pawn Код:
public OnRecordingPlaybackEnd( ) StartRecordingPlayback( RECORDING_TYPE, RECORDING );
public OnNPCEnterVehicle( vehicleid, seatid ) StartRecordingPlayback( RECORDING_TYPE, RECORDING );
public OnNPCExitVehicle( ) StopRecordingPlayback( );
And errors...
Код:
C:\Documents and Settings\Mureseanu\Desktop\Rock's Server\gamemodes\RTS.pwn(226) : warning 235: public function lacks forward declaration (symbol "OnRecordingPlaybackEnd")
C:\Documents and Settings\Mureseanu\Desktop\Rock's Server\gamemodes\RTS.pwn(226) : error 017: undefined symbol "StartRecordingPlayback"
C:\Documents and Settings\Mureseanu\Desktop\Rock's Server\gamemodes\RTS.pwn(228) : warning 235: public function lacks forward declaration (symbol "OnNPCEnterVehicle")
C:\Documents and Settings\Mureseanu\Desktop\Rock's Server\gamemodes\RTS.pwn(228) : error 017: undefined symbol "StartRecordingPlayback"
C:\Documents and Settings\Mureseanu\Desktop\Rock's Server\gamemodes\RTS.pwn(229) : warning 235: public function lacks forward declaration (symbol "OnNPCExitVehicle")
C:\Documents and Settings\Mureseanu\Desktop\Rock's Server\gamemodes\RTS.pwn(229) : error 017: undefined symbol "StopRecordingPlayback"



Re: NPC Problem - Zh3r0 - 18.08.2011

Weren't those custom functions?


Re: NPC Problem - Rock_Ro - 18.08.2011

Quote:
Originally Posted by Zh3r0
Посмотреть сообщение
Weren't those custom functions?
Yes..from a_npc.inc
I included a_npc..
pawn Код:
#include < a_samp  > /* By SA-MP Team */
#include <  a_npc  > /* By SA-MP Team */
#include < sscanf  > /* By ******     */
#include < foreach > /* By ******     */
#include <  zcmd   > /* By ZeeX       */
#include <   RSF   > /* By Rock       */
#include <  rBits  > /* By RyDeR      */
#include <   BUD   > /* By Slice      */



Re: NPC Problem - =WoR=Varth - 18.08.2011

AFAIK you can't use a_npc inside your gamemode. You can only use it in NPC script.
https://sampforum.blast.hk/showthread.php?tid=95034


Re: NPC Problem - Rock_Ro - 18.08.2011

Quote:
Originally Posted by varthshenon
Посмотреть сообщение
AFAIK you can't use a_npc inside your gamemode. You can only use it in NPC script.
https://sampforum.blast.hk/showthread.php?tid=95034
Nop..tried in fs too, same thing..

Код:
This forum requires that you wait 120 seconds between posts. Please try again in 30 seconds.
Arrhh..


Re: NPC Problem - MadeMan - 18.08.2011

If it's npcmode, remove the

pawn Код:
#include <a_samp>



Re: NPC Problem - Rock_Ro - 18.08.2011

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
If it's npcmode, remove the

pawn Код:
#include <a_samp>
If i do that...
Код:
C:\Documents and Settings\Mureseanu\Desktop\test.pwn(8) : warning 235: public function lacks forward declaration (symbol "OnFilterScriptInit")
C:\Documents and Settings\Mureseanu\Desktop\test.pwn(10) : error 017: undefined symbol "ConnectNPC"
C:\Documents and Settings\Mureseanu\Desktop\test.pwn(11) : error 017: undefined symbol "CreateVehicle"
C:\Documents and Settings\Mureseanu\Desktop\test.pwn(25) : warning 235: public function lacks forward declaration (symbol "OnPlayerSpawn")
C:\Documents and Settings\Mureseanu\Desktop\test.pwn(27) : error 017: undefined symbol "IsPlayerNPC"
C:\Documents and Settings\Mureseanu\Desktop\test.pwn(34) : error 017: undefined symbol "PutPlayerInVehicle"
C:\Documents and Settings\Mureseanu\Desktop\test.pwn(11) : warning 204: symbol is assigned a value that is never used: "DriftingNPC"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.