SA-MP Forums Archive
File or function is not found - 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: File or function is not found (/showthread.php?tid=240409)



File or function is not found - austin070 - 15.03.2011

Hey guys. I was just adding a command to my script and suddenly I got an error in my server. Notice I said "server" and not "script". Here is the error:

Code:
Script[gamemodes/rp.amx]: Run time error 19: "File or function is not found"
All I added was this:

pawn Code:
CMD:restart(playerid, params[])
{
    if(GetAdminLevel(playerid) >=5 || IsPlayerAdmin(playerid))
    {
        for(new i = 0; i<MAX_PLAYERS; i++)
        {
            new file[256];
            new Float:x, Float:y, Float:z;
            GetPlayerPos(playerid, x, y, z);
            dini_FloatSet(file, "XPos", x);
            dini_FloatSet(file, "YPos", y);
            dini_FloatSet(file, "ZPos", z);
            dini_IntSet(file, "Interior", GetPlayerInterior(playerid));
        }
        SendRconCommand("gmx");
    }
    return 1;
}
Any idea of how to fix this error?


Re: File or function is not found - admantis - 15.03.2011

you need to put Dini.inc in the chain ../pawno/include/
edited due misread, again, don't mind above's comment


Re: File or function is not found - austin070 - 15.03.2011

I have all of the include files required.


Re: File or function is not found - NotoriousMOB - 15.03.2011

Does it compile
and you sure its after the code, have you tried to remove the code to be sure its that?

Else try this :

pawn Code:
if(strcmp(cmd, "/gmx", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (PlayerInfo[playerid][pAdmin] >= 5)
            {
                GameModeExit();
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
            }
        }
        return 1;
    }
iff its a GMX cmd?


Re: File or function is not found - austin070 - 15.03.2011

Quote:
Originally Posted by NotoriousMOB
View Post
Does it compile
and you sure its after the code, have you tried to remove the code to be sure its that?

Else try this :

pawn Code:
if(strcmp(cmd, "/gmx", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (PlayerInfo[playerid][pAdmin] >= 5)
            {
                GameModeExit();
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
            }
        }
        return 1;
    }
iff its a GMX cmd?
I did remove it to see if it was that. I got the same error. The thing is, this didn't happen until i put that in.