SA-MP Forums Archive
[NPC] Undefined Symbol. - 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)
+--- Thread: [NPC] Undefined Symbol. (/showthread.php?tid=417959)



[NPC] Undefined Symbol. - faff - 23.02.2013

Hello', i'm Trying to script something for the npc.
The problem is...
It's showing errors since the last compile.

The code:

Код:
public OnPlayerTargetPlayer(playerid,newtarget,oldtarget)
{
    new string[128];
    if(newtarget != INVALID_PLAYER_ID && IsPlayerConnected(newtarget) && IsPlayerNPC(newtarget) && GetPlayerWeapon(playerid) >= 22 && GetPlayerWeapon(playerid) <= 38)
	{
     ApplyAnimation(newtarget,"PED","handsup",4.1,0,1,1,1,1);
     PauseRecordingPlayback(newtarget); // line 3792
     SetTimer("npcresume", 10000, false); // line 3793
     format(string, sizeof(string), "Faff: Calm Down pink nigga Before i kill ya doggy!"; // line 3794
     SendNearbyMessage(playerid, 10, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
    }
}
Errors:

Код:
C:\Users\Fabio\Desktop\LSC-RP\gamemodes\ZRP.pwn(3792) : error 017: undefined symbol "PauseRecordingPlayback"
C:\Users\Fabio\Desktop\LSC-RP\gamemodes\ZRP.pwn(3794) : error 001: expected token: ",", but found ";"
I hope somebody could help me.


Re : [NPC] Undefined Symbol. - yusei - 23.02.2013

format(string, sizeof(string), "Faff: Calm Down pink nigga Before i kill ya doggy!"); // line 3794

PauseRecordingPlayback(); // line 3792


Re: [NPC] Undefined Symbol. - faff - 23.02.2013

Thanks, Still got the Error from the undefined symbol.


Re: [NPC] Undefined Symbol. - DaRk_RaiN - 23.02.2013

Add this at the top of your script(under a_samp)
pawn Код:
#include <a_npc>
pawn Код:
public OnPlayerTargetPlayer(playerid,newtarget,oldtarget)
{
    new string[128];
    if(newtarget != INVALID_PLAYER_ID && IsPlayerConnected(newtarget) && IsPlayerNPC(newtarget) && GetPlayerWeapon(playerid) >= 22 && GetPlayerWeapon(playerid) <= 38)
    {
     ApplyAnimation(newtarget,"PED","handsup",4.1,0,1,1,1,1);
     PauseRecordingPlayback(newtarget); // line 3792
     SetTimer("npcresume", 10000, false); // line 3793
     format(string, sizeof(string), "Faff: Calm Down pink nigga Before i kill ya doggy!"); // line 3794
     SendNearbyMessage(playerid, 10, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
    }
}



Re : [NPC] Undefined Symbol. - yusei - 23.02.2013

did u try PauseRecordingPlayback(); ?


Re: Re : [NPC] Undefined Symbol. - faff - 23.02.2013

Quote:
Originally Posted by yusei
Посмотреть сообщение
did u try PauseRecordingPlayback(); ?
I did, and it didnt worked.

And yes, i added the NPC include.


Re : [NPC] Undefined Symbol. - yusei - 23.02.2013

StopRecordingPlayback();


Re: Re : [NPC] Undefined Symbol. - faff - 23.02.2013

Quote:
Originally Posted by yusei
Посмотреть сообщение
StopRecordingPlayback();
Aint working.