Dialog problem - Rep+
#1

Hello. I have got a problem with dialogs. I am making "pravila" or on English "rules" command with dialogs. I've got some errors,so take a look:

- OnDialogResponse:

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch( 
dialogid )
    {
        case 
DIALOG_REGISTER:
        {
            if (!
response) return Kick(playerid);
            if(
response)
            {
                if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_PASSWORD""COL_WHITE"Registracija",""COL_WHITE"Poљtovani,upisali ste nedozvoljivu lozinku.\n"COL_WHITE"Upiљite vasu lozinku kako biste se registrirali na server.\nVazno je znati da"COL_LIGHTBLUE" WG zajednica"COL_WHITE" nece nikad odat vasu lozinku.\nAko imate dodatnih problema kontaktirajte nas na webu!","Registracija","Izlaz");
                new 
INI:File INI_Open(UserPath(playerid));
                
INI_SetTag(File,"data");
                
INI_WriteInt(File,"Password",udb_hash(inputtext));
                
INI_WriteInt(File,"Score",0);
                
INI_WriteInt(File,"Novac",0);
                
INI_WriteInt(File,"Administrator",0);
                
INI_WriteInt(File,"Viplevel",0);
                
INI_WriteInt(File,"Banka",0);
                
INI_WriteInt(File,"Banovan",0);
                
INI_WriteInt(File,"Ubojstva",0);
                
INI_WriteInt(File,"Smrti",0);
                
INI_Close(File);
                
SpawnPlayer(playerid);
                
ShowPlayerDialog(playeridDIALOG_SUCCESS_1DIALOG_STYLE_MSGBOX,""COL_WHITE"Uspjesna registracija",""COL_WHITE"Poљtovani,uspjeљno ste registrirali novi account.\nZa vaљu sigurnost preporučavamo vam da odradite 'relog' kako bismo spremili podatke.\nUzivajte igrajuci na nasem serveru!","Uredu","");
            }
        }
        case 
DIALOG_LOGIN:
        {
            if ( !
response ) return Kick playerid );
            if( 
response )
            {
                if(
udb_hash(inputtext) == PlayerInfo[playerid][pPassword])
                {
                    
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
                    
GivePlayerMoney(playeridPlayerInfo[playerid][pNovac]);
                    
SetPlayerScore(playeridPlayerInfo[playerid][pScore]);
                    
ShowPlayerDialog(playeridDIALOG_SUCCESS_2DIALOG_STYLE_MSGBOX,""COL_WHITE"Uspjesno logiranje",""COL_WHITE"Poљtovani,uspjeљno ste se ulogirali na vas account.\nNastavite sa igrom tamo gdje ste stali.\nUzivanje na nasem serveru zeli vam"COL_LIGHTBLUE" WG Administracija.\n\n"COL_WHITE"Ako imate dodatnih problema u vezi accounta kontaktirajte nas na webu!\n"COL_ORANGEwww.WilderGaming.net","Uredu","");
                }
                else
                {
                    
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,""COL_WHITE"Logiranje",""COL_WHITE"Poљtovani,upisali ste pogreљnu lozinku.\n"COL_WHITE"Molimo vas da pazljivo unesete tocnu lozinku.\nImate"COL_LIGHTBLUE" 30 sekundi"COL_WHITE" da unesete lozinku uprotivnom ćete biti kikovani sa servera.","Login","Izlaz");
                }
                return 
1;
            }
         }
        
     }
}
{
    {
        if(
dialogid == DIALOG_PRAVILA//verify if our dialog id is = with dialog created and if exist
        
{
             if(
response// press the Accept button
              
{
                 
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Procitali ste osnovna RP pravila.");
            }
            return 
1;
        }
    }
    return 
0;

Defines:
PHP код:
#define DIALOG_PRAVILA 5 
Errors:

PHP код:
C:\Users\Dino Covic\Desktop\SAMP Server\pawno\include\a_samp.inc(72) : error 025: function heading differs from prototype
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(657) : warning 209: function "S@@_OnDialogResponse" should return a value
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(659) : error 055start of function body without function header
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(661) : error 055start of function body without function header
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(662) : error 010invalid function or declaration
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(664) : error 010invalid function or declaration
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(668) : error 010invalid function or declaration
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(671) : error 010invalid function or declaration
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
7 Errors

Error Lines:

PHP код:
{
    {
        if(
dialogid == DIALOG_PRAVILA//verify if our dialog id is = with dialog created and if exist
        
{
             if(
response// press the Accept button
              
{
                 
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Procitali ste osnovna RP pravila.");
            }
            return 
1;
        }
    }
    return 
0;

Reply


Messages In This Thread
Dialog problem - Rep+ - by NoDi522 - 05.03.2015, 10:49
Re: Dialog problem - Rep+ - by CalvinC - 05.03.2015, 11:09
Respuesta: Dialog problem - Rep+ - by JuanStone - 05.03.2015, 11:22
Re: Dialog problem - Rep+ - by NoDi522 - 05.03.2015, 11:30
Re: Dialog problem - Rep+ - by Wolfey20 - 05.03.2015, 11:38
Re: Dialog problem - Rep+ - by J0sh... - 05.03.2015, 11:40
Re: Dialog problem - Rep+ - by NoDi522 - 05.03.2015, 11:42
Respuesta: Dialog problem - Rep+ - by JuanStone - 05.03.2015, 11:44
Re: Dialog problem - Rep+ - by NoDi522 - 05.03.2015, 11:48
Re: Dialog problem - Rep+ - by J0sh... - 05.03.2015, 11:50

Forum Jump:


Users browsing this thread: 4 Guest(s)