SA-MP Forums Archive
Help pls - 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 pls (/showthread.php?tid=657002)



Help pls - LOLITO - 29.07.2018

Hi, I was doing a certification system for administrators but I have these errors.


Errors:

Код:
C:\Aventure Roleplay\gamemodes\AVENTURE.pwn(961) : error 017: undefined symbol "Checkaccount"
C:\Aventure Roleplay\gamemodes\AVENTURE.pwn(1599) : error 017: undefined symbol "Checkaccount"
Lines:

Код:
    new NameA[MAX_PLAYER_NAME];
    GetPlayerName(playerid, NameA, sizeof(NameA));
    if(!Checkaccount(NameA))  // Error 961
    {
        SendClientMessage(playerid, -1, "You are not a certified administrator.");
        SetTimerEx("Kickear", 500, false, "i", playerid);
    }




      if(dialogid == D_Certified)
    {
        if(response)
        {
            if(!strlen(inputtext))
            {
               SendClientMessage(playerid, -1, "You have not entered the name of the account.");
                return ShowPlayerDialog(playerid, D_Certified, DIALOG_STYLE_INPUT, "Test", "Test:", ">", "x");
            }
            if(Checkaccount(inputtext))  //Line 1599
            {
                new Message[29 + MAX_PLAYER_NAME];
                format(Message, sizeof(Message), "Account %s It was certified.", inputtext);
                SendClientMessage(playerid, -1, Message);
            } else {
                new Message[29 + MAX_PLAYER_NAME];
                format(Message, sizeof(Message), "Account  %s Not certified.", inputtext);
                SendClientMessage(playerid, -1, Message;
            }
        }
        return 1;
    }



Re: Help pls - Florin48 - 29.07.2018

you dont have function Checkaccount, try to find it in other gamemode where you copied other things.


Re: Help pls - LOLITO - 29.07.2018

Quote:
Originally Posted by Florin48
Посмотреть сообщение
you dont have function Checkaccount, try to find it in other gamemode where you copied other things.
it is not copied from another Gamemodes.


Re: Help pls - Florin48 - 29.07.2018

Quote:
Originally Posted by LOLITO
Посмотреть сообщение
it is not copied from another Gamemodes.
and where did you get that function in gamemode?
may be in a include, try to find it on the internet.


Re: Help pls - LOLITO - 29.07.2018

Quote:
Originally Posted by Florin48
Посмотреть сообщение
and where did you get that function in gamemode?
may be in a include, try to find it on the internet.
says that this is the function

Код:
         if(dialogid == D_Certified)
    {
        if(response)
        {
            if(!strlen(inputtext))
            {
               SendClientMessage(playerid, -1, "You have not entered the name of the account.");
                return ShowPlayerDialog(playerid, D_Certified, DIALOG_STYLE_INPUT, "Test", "Test:", ">", "x");
            }
            if(Checkaccount(inputtext))  //function
            {
                new Message[29 + MAX_PLAYER_NAME];
                format(Message, sizeof(Message), "Account %s It was certified.", inputtext);
                SendClientMessage(playerid, -1, Message);
            } else {
                new Message[29 + MAX_PLAYER_NAME];
                format(Message, sizeof(Message), "Account  %s Not certified.", inputtext);
                SendClientMessage(playerid, -1, Message;
            }
        }
        return 1;
    }



Re: Help pls - Florin48 - 29.07.2018

no, this is just a dialog, you forgot

Quote:

if(dialogid == D_Certified)
{
if(response)
{
if(!strlen(inputtext))
{
SendClientMessage(playerid, -1, "You have not entered the name of the account.");
return ShowPlayerDialog(playerid, D_Certified, DIALOG_STYLE_INPUT, "Test", "Test:", ">", "x");
}
if(Checkaccount(inputtext)) //function
{
new Message[29 + MAX_PLAYER_NAME];
format(Message, sizeof(Message), "Account %s It was certified.", inputtext);
SendClientMessage(playerid, -1, Message);
} else {
new Message[29 + MAX_PLAYER_NAME];
format(Message, sizeof(Message), "Account %s Not certified.", inputtext);
SendClientMessage(playerid, -1, Message;
}
}
return 1;
}

you dont have this function in your gm


Re: Help pls - LOLITO - 29.07.2018

Quote:
Originally Posted by Florin48
Посмотреть сообщение
no, this is just a dialog, you forgot



you dont have this function in your gm
If I know it's a dialog but it tells me where it comes from, that's the function


Код:

            if(Checkaccount(inputtext))  //that is the function that checks the account

            {
                new Message[29 + MAX_PLAYER_NAME];
                format(Message, sizeof(Message), "Account %s It was certified.", inputtext);
                SendClientMessage(playerid, -1, Message);
            } else {
                new Message[29 + MAX_PLAYER_NAME];
                format(Message, sizeof(Message), "Account  %s Not certified.", inputtext);
                SendClientMessage(playerid, -1, Message;
            }
        }
        return 1;
    }



Re: Help pls - Florin48 - 29.07.2018

man, you need function Checkaccount
she look like
Quote:

Checkaccount(text[])
{
if(....blabla...) return true;
return false;
}

or whatever it contains, I have no way of knowing what that function is doing.