Two errors. (Dialogs, Y_Ini & Whirlpool) - Unidentified symbol: INI_String.
#1

Hey y'all.

I've been working on a script for quite some hours now. I keep on stumbling across these problems. What I want is to perform a check, if the password given inside the server, is the same as an encrypted whirlpool password, and if it is, I want to return "OnPlayerLogin", but it keeps giving me two errors:

The script:
pawn Код:
if(dialogid == dialoglogin)
{
        if(!response) return Kick(playerid);
        if(!strlen(inputtext)) return ShowPlayerDialog(playerid, dialoglogin, DIALOG_STYLE_INPUT, "Greetings!", "{FFFFFF}Welcome.\nPlease login to play.", "Login", "Disconnect");

        new userFile[13 + MAX_PLAYER_NAME +1], buffer[129];
        format(userFile,sizeof(userFile), rootdir-, PlayerName(playerid));
       
        if(WP_Hash(buffer, sizeof(buffer), inputtext) == INI_String(userFile, "Password")) return OnPlayerLogin(playerid);
        else if(!WP_Hash(buffer, sizeof(buffer), inputtext) != INI_String(userFile, "Password"))
        {
            SendClientMessage(playerid, white, "{AA3333}Wrong password! {FFFFFF}If this is not your account, please disconnect.");
            ShowPlayerDialog(playerid, dialoglogin, DIALOG_STYLE_INPUT, "Greetings!", "{FFFFFF}Welcome.{FFFFFF}.\nPlease login to play.", "Login", "Disconnect");
        }
}
The two errors:
Quote:

C:\samp03csvr_R2-2_win32\gamemodes\xs3.pwn(650) : error 017: undefined symbol "INI_String"
C:\samp03csvr_R2-2_win32\gamemodes\xs3.pwn(651) : error 017: undefined symbol "INI_String"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

I've only recently begun using ******'s includes, my guess is my scripting is definitely not flawless yet , I've read and searched for this error, but I found no answers.

Any help is appreciated.
Reply
#2

To compare if 2 strings are the same use strcmp.
I think it should look something like this: (If you have the players password in a enum you could use that instead of "PlayerPass"
pawn Код:
new PlayerPass[129];
WP_Hash(buffer, sizeof(buffer), inputtext);
PlayerPass = INI_String(userFile, "Password");
if(!strcmp(buffer, PlayerPass, true))
{
    //Password is correct
}
else
{
    //Password is wrong
}
Reply
#3

That leaves me at:
pawn Код:
if(dialogid == dialoglogin)
    {
        if(!response) return Kick(playerid);
        if(!strlen(inputtext)) return ShowPlayerDialog(playerid, dialoglogin, DIALOG_STYLE_INPUT, "Greetings!", "{FFFFFF}Welcome.\nPlease login to play.", "Login", "Disconnect");

        new userFile[13 + MAX_PLAYER_NAME +1], buffer[129], PlayerPass[129+1];
        format(userFile,sizeof(userFile), rootdir-, PlayerName(playerid));
        WP_Hash(buffer, sizeof(buffer), inputtext);
       
        PlayerPass[129] = INI_String(userFile, "password");
       
        if(!strcmp(buffer, PlayerPass, true)) return OnPlayerLogin(playerid);
        else if (!strcmp(buffer, PlayerPass, false))
        {
            SendClientMessage(playerid, white, "{AA3333}Wrong password! {FFFFFF}If this is not your account, please disconnect.");
            ShowPlayerDialog(playerid, dialoglogin, DIALOG_STYLE_INPUT, "Greetings!", "{FFFFFF}Welcome.\nPlease login to play.", "Login", "Disconnect");
        }
    }
Quote:

C:\samp03csvr_R2-2_win32\gamemodes\xs3.pwn(651) : error 017: undefined symbol "INI_String"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

I don't really understand why it's giving me this error. I have ******'s latest includes. Any ideas?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)