[Help] Getting an error in ApplyAnimation. - 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: [Help] Getting an error in ApplyAnimation. (
/showthread.php?tid=280866)
[Help] Getting an error in ApplyAnimation. -
Da' J' - 03.09.2011
I'm trying to put an animation to workin a FS (Dropgun), bomber anim. It's throwing me this:
pawn Код:
C:\Users\Joni\Desktop\SA-MP Server Test\filterscripts\dropgun.pwn(130) : error 017: undefined symbol "BOMBER"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
This is the part of the code where i want it:
pawn Код:
//=================//
command(pickitem, playerid, params[])
{
for(new i = 0; i < sizeof(DropInfo); i++)
{
if (IsPlayerInRangeOfPoint(playerid, 2.0,DropInfo[i][DropGunPosX],DropInfo[i][DropGunPosY],DropInfo[i][DropGunPosZ]))
{
if(GetPlayerVirtualWorld(playerid) == DropInfo[i][DropGunVWorld] && GetPlayerInterior(playerid) == DropInfo[i][DropGunVWorld])
{
ApplyAnimation(playerid, BOMBER, BOM_Plant, Float:4, 0, 0, 0, 0, 0, 1)
GetPlayerName(playerid, sendername, sizeof(sendername));
DestroyDynamicObject(DropObject[i]);
DropInfo[i][DropGunPosX] = 0.0;
DropInfo[i][DropGunPosY] = 0.0;
DropInfo[i][DropGunPosZ] = 0.0;
DropInfo[i][DropGunAmmount][0] = 0;
DropInfo[i][DropGunAmmount][1] = 0;
GivePlayerWeapon(playerid,DropInfo[i][DropGunAmmount][0],DropInfo[i][DropGunAmmount][1]);
format(string, sizeof(string), "* %s picks up a weapon from the pavement.", sendername);
SendLocalMessage(playerid, string, 10.0, COLOR_ACTION, COLOR_ACTION);
}
}
}
return 1;
}
//=================//
Re: [Help] Getting an error in ApplyAnimation. -
=WoR=Varth - 03.09.2011
pawn Код:
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4, 0, 0, 0, 0, 0, 1)
Re: [Help] Getting an error in ApplyAnimation. -
Improvement™ - 03.09.2011
pawn Код:
ApplyAnimation(playerid, BOMBER, BOM_Plant, Float:4, 0, 0, 0, 0, 0, 1)
Supposed to be:
pawn Код:
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", Float:4, 0, 0, 0, 0, 0, 1);
You also forgot the put the ';' symbol behind the ApplyAnimation()
SA-MP Wiki ApplyAnimation.
Re: [Help] Getting an error in ApplyAnimation. -
Da' J' - 03.09.2011
Ok, thanks again. And thanks for extremily fast response