fatal error - too many error messages on one line
#1

Код:
xx\lsdm.pwn(337) : error 001: expected token: "-string end-", but found "-identifier-"
xx\lsdm.pwn(337) : warning 215: expression has no effect
xx\lsdm.pwn(337) : error 001: expected token: ";", but found "-string-"
xx\lsdm.pwn(337) : warning 215: expression has no effect
xx\lsdm.pwn(337) : warning 215: expression has no effect
xx\lsdm.pwn(337) : warning 215: expression has no effect
xx\lsdm.pwn(337) : error 001: expected token: ";", but found ")"
xx\lsdm.pwn(337) : fatal error 107: too many error messages on one line
Here is the line...

PHP код:
                if(!strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit"); 
Reply
#2

Quote:
Originally Posted by Melktert
Посмотреть сообщение
Код:
xx\lsdm.pwn(337) : error 001: expected token: "-string end-", but found "-identifier-"
xx\lsdm.pwn(337) : warning 215: expression has no effect
xx\lsdm.pwn(337) : error 001: expected token: ";", but found "-string-"
xx\lsdm.pwn(337) : warning 215: expression has no effect
xx\lsdm.pwn(337) : warning 215: expression has no effect
xx\lsdm.pwn(337) : warning 215: expression has no effect
xx\lsdm.pwn(337) : error 001: expected token: ";", but found ")"
xx\lsdm.pwn(337) : fatal error 107: too many error messages on one line
Here is the line...

PHP код:
                if(!strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit"); 
it should work

make sure you defined your colors like this
PHP код:
#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}" 
Reply
#3

Plesse use the "{Hex}" format for colors in dialog.

https://sampwiki.blast.hk/wiki/Colors_List
Reply
#4

They are defined at the top of the script, I'm assuming I did something wrong around that area that caused this.

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_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"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_WriteInt(File,"Score",0);
                
INI_WriteInt(File,"Banned",0);
                
INI_Close(File);

                
SetSpawnInfo(playerid001958.331343.1215.36269.15000000);
                
SpawnPlayer(playerid);
                
ShowPlayerDialog(playeridDIALOG_SUCCESS_1DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_WHITE"You have "COL_GREEN"successfully"COL_WHITE" registered.","Ok","");
                
GivePlayerMoney(playerid1000);
            }
        }

        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]);
                    
SetPlayerScore(playeridPlayerInfo[playerid][pScore]);
                    
ShowPlayerDialog(playeridDIALOG_SUCCESS_2DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"{FFFFFF}You have {04F6BB}successfully{FFFFFF} logged in!","Ok","");
                }
                else
                {
                    
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"You have entered an "COL_RED"incorrect{FFFFFF} password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
                }
                return 
1;
            }
        }
    }
    return 
1;

Reply
#5

Quote:
Originally Posted by Melktert
Посмотреть сообщение
They are defined at the top of the script, I'm assuming I did something wrong around that area that caused this.

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_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"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_WriteInt(File,"Score",0);
                
INI_WriteInt(File,"Banned",0);
                
INI_Close(File);
                
SetSpawnInfo(playerid001958.331343.1215.36269.15000000);
                
SpawnPlayer(playerid);
                
ShowPlayerDialog(playeridDIALOG_SUCCESS_1DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_WHITE"You have "COL_GREEN"successfully"COL_WHITE" registered.","Ok","");
                
GivePlayerMoney(playerid1000);
            }
        }
        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]);
                    
SetPlayerScore(playeridPlayerInfo[playerid][pScore]);
                    
ShowPlayerDialog(playeridDIALOG_SUCCESS_2DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"{FFFFFF}You have {04F6BB}successfully{FFFFFF} logged in!","Ok","");
                }
                else
                {
                    
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"You have entered an "COL_RED"incorrect{FFFFFF} password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
                }
                return 
1;
            }
        }
    }
    return 
1;

im sure you dident define them as Hex collor cus i test that line and it worked for me

note that they are different type of colors

#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}" // Hex

#define COLOR_RED 0xFF0000AA
#define COLOR_WHITE 0xFFFFFFAA

you have to use hex in dialogs
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)