Problem with dialog - Register system
#1

Hello.

I'am working on my "sex dialog".

So here are errors:

PHP код:
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1120) : error 017undefined symbol "musko"
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1127) : error 017undefined symbol "zensko"
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1131) : error 002only a single statement (or expressioncan follow each "case"
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1135) : warning 217loose indentation
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1135) : error 014invalid statementnot in switch
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1135) : warning 215expression has no effect
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1135) : error 001expected token";"but found ":"
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1135) : error 029invalid expressionassumed zero
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1135) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
7 Errors

Mine OnDialogResponse:

PHP код:
        case DIALOG_SPOL:
        {
        if(!
response) return Kick(playerid);
        if(
response)
            switch(
listitem)
            {
            
//Otvaramo caseove
            
case 0:
            {
                new 
INI:File INI_Open(UserPath(playerid));
                
INI_WriteInt(File,"Spol",musko);
                
INI_Close(File);
                
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Odabrali ste spol: muљko");
            }
            case 
1:
            {
                new 
INI:File INI_Open(UserPath(playerid));
                
INI_WriteInt(File,"Spol",zensko);
                
INI_Close(File);
                
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Odabrali ste spol: ћensko");
            }
            {
                
ShowPlayerDialog(playeridDIALOG_SUCCESS_1DIALOG_STYLE_MSGBOX,""COL_WHITE"Uspjesna registracija",""COL_WHITE"Poљtovani,uspjeљno ste registrirali novi account.\nZa vaљu sigurnost preporucavamo vam da odradite 'relog' kako bismo spremili podatke.\nUzivajte igrajuci na nasem serveru!","Uredu","");
            }
        } 
Enum:

PHP код:
enum pInfo
{
    
pPassword,
    
pSkin,
    
pSpol,
    
pScore,
    
pNovac,
    
pZemlja,
    
pSupporter,
    
pAdministrator,
    
pVip,
    
pUbojstva,
    
pBankNovac,
    
pBanovan,
    
pSmrti
};
new 
PlayerInfo[MAX_PLAYERS][pInfo]; 
Defined:

PHP код:
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SPOL 5
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4 
Showplayerdialog:

PHP код:
    if(fexist(UserPath(playerid)))
    {
        
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
         if(
PlayerInfo[playerid][pBanovan] == 1) return Ban(playerid);
         else
         {
        
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD," "COL_WHITE"Logiranje",""COL_WHITE"Molimo vas da pazljivo unesete tocnu lozinku.\nImate"COL_LIGHTBLUE" 30 sekundi "COL_WHITE" da unesete lozinku uprotivnom cete biti kikovani sa servera","Login","Izlaz");
        }
    }
    else
    {
         
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_PASSWORD,""COL_WHITE"Registracija",""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!\nWeb:"COL_EASYwww.WilderGaming.net","Registracija","Izlaz");
        
ShowPlayerDialog(playeridDIALOG_SPOLDIALOG_STYLE_LIST,"Odaberite spol","[1] Musko\n[2] Zensko","Odaberi","Izlaz");
        
GivePlayerMoney(playerid15000);
        
SetPlayerScore(playerid1);
    } 
Reply
#2

Can you translate it?
Reply
#3

Can you show the error line plz
Reply
#4

Quote:
Originally Posted by StreetRP
Посмотреть сообщение
Can you show the error line plz
Can't you guess it? Well, the first error is in this line:
PHP код:
 INI_WriteInt(File,"Spol",musko); 
Add numbers to it to find next lines.
Reply
#5

PHP код:
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1130) : error 002only a single statement (or expressioncan follow each "case"
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1134) : warning 217loose indentation
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1134) : error 014invalid statementnot in switch
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1134) : warning 215expression has no effect
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1134) : error 001expected token";"but found ":"
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1134) : error 029invalid expressionassumed zero
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1134) : fatal error 107too many error messages on one line 
Now i got these errors ?
Reply
#6

Show the script line :
1134
and 1130
Reply
#7

1130:

{

1134:

case DIALOG_LOGIN:
Reply
#8

Try this:
PHP код:
        case DIALOG_SPOL
        { 
        if(!
response) return Kick(playerid); 
        if(
response
            switch(
listitem
            { 
            
//Otvaramo caseove 
            
case 0
            { 
                new 
INI:File INI_Open(UserPath(playerid)); 
                
INI_WriteInt(File,"Spol",musko); 
                
INI_Close(File); 
                
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Odabrali ste spol: muљko"); 
            } 
            case 
1
            { 
                new 
INI:File INI_Open(UserPath(playerid)); 
                
INI_WriteInt(File,"Spol",zensko); 
                
INI_Close(File); 
                
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Odabrali ste spol: ћensko"); 
            }
       } 
       
ShowPlayerDialog(playeridDIALOG_SUCCESS_1DIALOG_STYLE_MSGBOX,""COL_WHITE"Uspjesna registracija",""COL_WHITE"Poљtovani,uspjeљno ste registrirali novi account.\nZa vaљu sigurnost preporucavamo vam da odradite 'relog' kako bismo spremili podatke.\nUzivajte igrajuci na nasem serveru!","Uredu",""); 
This will fix 1 error, I think. How many cases do you have?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)