SA-MP Forums Archive
invalid function - 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: invalid function (/showthread.php?tid=619145)



invalid function - iLearner - 14.10.2016

PHP код:
timer RespawnZombieForPlayer[TimerRespawnZombie[playerid]](playerid)
{
    new 
Float:xa,Float:ya,Float:za,Float:aa;
    for(new 
0;i<MAX_ZOMBIE_FOR_PLAYER;i++)
    {
        if(
FCNPC_IsDead(ZombieForPlayerID[playerid][i]))
        {
            
FCNPC_Respawn(ZombieForPlayerID[playerid][i]);
        }
        if(
FCNPC_IsSpawned(ZombieForPlayerID[playerid][i]) && ZombieIsAttack[ZombieForPlayerID[playerid][i]] == 0)
        {
            
GetPlayerPos(playerid,xa,ya,za);
            
aa=float(random(360));
            
xa=xa+DistanceZSpawn[playerid]*floatsin(aa,degrees);
            
ya=ya+DistanceZSpawn[playerid]*floatcos(aa,degrees);
            
za=za+0.7;
            
FCNPC_SetPosition(ZombieForPlayerID[playerid][i],xa,ya,za+0.7);
            
FCNPC_SetAngle(ZombieForPlayerID[playerid][i],aa);
             
FCNPC_Stop(ZombieForPlayerID[playerid][i]);
             
FCNPC_StopAttack(ZombieForPlayerID[playerid][i]);
            
ZombieAttackPID[ZombieForPlayerID[playerid][i]] = playerid;
        }
    }
    return 
1;

This was working fine.. then it starting giving me problem with
PHP код:
new Float:x,Float:y,Float:z,Float:a
prece level.... so i changed em
PHP код:
new Float:xa,Float:ya,Float:za,Float:aa
and all the rest in this func now it gives me this error

PHP код:
mysqlgm.pwn(14658) : error 010invalid function or declaration
mysqlgm
.pwn(14658 -- 14661) : error 010invalid function or declaration
mysqlgm
.pwn(14658 -- 14663) : error 010invalid function or declaration
mysqlgm
.pwn(14658 -- 14663) : fatal error 107too many error messages on one line 
Line 14658 is function's first line


Re: invalid function - Hansrutger - 14.10.2016

What include is that? Never seen it. Anyways it seems like something is wrong with the making of the function (duuh) and that is why I'm asking from where you came across to use it, aka from which include/plugin?


Re: invalid function - iLearner - 14.10.2016

nvm solved