SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 11/05/2011, 07:11 PM   #1
shitbird
High-roller
 
shitbird's Avatar
 
Join Date: Nov 2007
Posts: 1,307
Reputation: 31
Flowers [Hilfe :D]Two errors. (Dialogs, Y_Ini & Whirlpool) - Unidentified symbol: INI_String.

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 Code:
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 (c) 1997-2006, ITB CompuPhase


2 Errors.
I've only recently begun using Y_Less'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.

Last edited by shitbird; 11/05/2011 at 09:02 PM.
shitbird is offline  
Old 11/05/2011, 07:23 PM   #2
Fj0rtizFredde
High-roller
 
Fj0rtizFredde's Avatar
 
Join Date: Jun 2008
Location: Sweden
Posts: 1,072
Reputation: 119
Default Re: Two errors. (Dialogs, Y_Ini & Whirlpool) - Unidentified symbol: INI_String.

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 Code:
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
}
__________________
Slowly coming back to Sa-Mp..

Latest crap I've made:
[Include]CleverBot - Never Be Alone Again!
Fj0rtizFredde is offline  
Old 11/05/2011, 07:31 PM   #3
shitbird
High-roller
 
shitbird's Avatar
 
Join Date: Nov 2007
Posts: 1,307
Reputation: 31
Default Re: Two errors. (Dialogs, Y_Ini & Whirlpool) - Unidentified symbol: INI_String.

That leaves me at:
pawn Code:
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 (c) 1997-2006, ITB CompuPhase


1 Error.
I don't really understand why it's giving me this error. I have Y_Less's latest includes. Any ideas?
shitbird is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
errors "undefined symbol" xir Help Archive 14 22/02/2011 10:44 AM
Whirlpool.so? <Weponz> Help Archive 2 30/09/2010 11:09 AM
Whirlpool errors! Gyvo Help Archive 8 07/03/2010 09:29 AM
[SERIOUS HELP SERIOUS ERRORS] undefined symbol "KillerName" Tigerbeast11 Help Archive 7 14/10/2009 05:12 PM
i get theese errors Undefined Symbol "cmdTEXT" aspire5630 Help Archive 1 27/04/2009 03:41 PM


All times are GMT. The time now is 07:51 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.