Big Probleme with Login/Register System FAST ! (+REP)
#1

Hello, i tried to fix those errors today but i can't. I don't know why, by the way i'm not pro Scripter. i'm newbie i just learned scripting this month but i'm able to make some systems and maps , gamemodes. So listen.
Here is the code and here is the errors
pawn Код:
C:\Users\infogenie\Desktop\Addictive Trainers V2.6\gamemodes\own.pwn(1824) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\infogenie\Desktop\Addictive Trainers V2.6\gamemodes\own.pwn(1824) : warning 215: expression has no effect
C:\Users\infogenie\Desktop\Addictive Trainers V2.6\gamemodes\own.pwn(1824) : error 001: expected token: ";", but found "-string-"
C:\Users\infogenie\Desktop\Addictive Trainers V2.6\gamemodes\own.pwn(1824) : warning 215: expression has no effect
C:\Users\infogenie\Desktop\Addictive Trainers V2.6\gamemodes\own.pwn(1824) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\infogenie\Desktop\Addictive Trainers V2.6\gamemodes\own.pwn(1824) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COLOR_CRIMSON"Login",""COLOR_CRIMSON"Type your password below to login.","Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COLOR_CRIMSON"Registering...",""COLOR_CRIMSON"Type your password below to register a new account.","Register","Quit");
    }


        return 1;
    }
    return 1;
}
LINE 1824 is the " ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COLOR_CRIMSON"Login",""COLOR_ CRIMSON"Type your password below to login.","Login","Quit");"
Reply
#2

How are you defining your colours?
If you want to use them that way, they need to be like this:
Код:
#define COLOR "{RRGGBB}"
Reply
#3

and how to define my custom color like that? how to make one like that?
Reply
#4

try colorpicker.com
and then define it like that
#define YourColor {RGBCodeThatYouGotFromColorPicker}
Reply
#5

Ok thanks.
But everything done and still some errors.
Here are the errors :
pawn Код:
C:\Users\infogenie\Desktop\Addictive Trainers V2.6\gamemodes\own.pwn(2152) : error 029: invalid expression, assumed zero
C:\Users\infogenie\Desktop\Addictive Trainers V2.6\gamemodes\own.pwn(2152) : error 029: invalid expression, assumed zero
C:\Users\infogenie\Desktop\Addictive Trainers V2.6\gamemodes\own.pwn(2202) : warning 225: unreachable code
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch( dialogid )
    {
        case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_TESTING"Registering...",""COL_TESTING"You have entered an invalid password.\n"COL_TESTING"Type your password below to register a new account.","Register","Quit");
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_WriteInt(File,"Cash",0);
                INI_WriteInt(File,"Admin",0);
                INI_WriteInt(File,"Kills",0);
                INI_WriteInt(File,"Deaths",0);
                INI_Close(File);

                SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
                ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_TESTING"Success!",""COL_TESTING"Great! Your Y_INI system works perfectly. Relog to save your stats!","Ok","");
            }
        }

        case DIALOG_LOGIN:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
                    ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_TESTING"Success!",""COL_TESTING"You have successfully logged in!","Ok","");
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_TESTING"Login",""COL_TESTING"You have entered an incorrect password.\n"COL_TESTING"Type your password below to login.","Login","Quit");
                }
                return 1;
            }
        }
    }
    return 1;
}
  return 1;
}
Ok. Line 2152 is the "public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])"
and line 2198 is the last "return 1;"
Reply
#6

hello?
Reply
#7

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch( 
dialogid )
    {
        case 
DIALOG_REGISTER:
        {
            if (!
response) return Kick(playerid);
            if(
response)
            {
                if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT""COL_TESTING"Registering...",""COL_TESTING"You have entered an invalid password.\n"COL_TESTING"Type your password below to register a new account.","Register","Quit");
                new 
INI:File INI_Open(UserPath(playerid));
                
INI_SetTag(File,"data");
                
INI_WriteInt(File,"Password",udb_hash(inputtext));
                
INI_WriteInt(File,"Cash",0);
                
INI_WriteInt(File,"Admin",0);
                
INI_WriteInt(File,"Kills",0);
                
INI_WriteInt(File,"Deaths",0);
                
INI_Close(File);

                
SetSpawnInfo(playerid001958.331343.1215.36269.15000000);
                
SpawnPlayer(playerid);
                
ShowPlayerDialog(playeridDIALOG_SUCCESS_1DIALOG_STYLE_MSGBOX,""COL_TESTING"Success!",""COL_TESTING"Great! Your Y_INI system works perfectly. Relog to save your stats!","Ok","");
            }
        }

        case 
DIALOG_LOGIN:
        {
            if ( !
response ) return Kick playerid );
            if( 
response )
            {
                if(
udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
                    
GivePlayerMoney(playeridPlayerInfo[playerid][pCash]);
                    
ShowPlayerDialog(playeridDIALOG_SUCCESS_2DIALOG_STYLE_MSGBOX,""COL_TESTING"Success!",""COL_TESTING"You have successfully logged in!","Ok","");
                }
                else
                {
                    
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,""COL_TESTING"Login",""COL_TESTING"You have entered an incorrect password.\n"COL_TESTING"Type your password below to login.","Login","Quit");
                }
                return 
1;
            }
        }
    }
    return 
1;

Reply
#8

pawn Код:
C:\Users\infogenie\Desktop\Addictive Trainers V2.6\gamemodes\own.pwn(2198) : warning 225: unreachable code
now i have this.
here is the line 2198
pawn Код:
return 1;
}
it's the last "return 1;"
Reply
#9

Quote:
Originally Posted by MarkNelson
Посмотреть сообщение
pawn Код:
C:\Users\infogenie\Desktop\Addictive Trainers V2.6\gamemodes\own.pwn(2198) : warning 225: unreachable code
now i have this.
here is the line 2198
pawn Код:
return 1;
}
it's the last "return 1;"
remove return
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)