File or function is not found
#1

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?
Reply
#2

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

I have all of the include files required.
Reply
#4

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?
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)