[Problem] Age dialog
#1

Errors:

PHP код:
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(293) : warning 219local variable "poruka" shadows a variable at a preceding level
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(314) : warning 219local variable "poruka" shadows a variable at a preceding level
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(347) : warning 219local variable "poruka" shadows a variable at a preceding level
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(418) : warning 219local variable "poruka" shadows a variable at a preceding level
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(439) : warning 219local variable "poruka" shadows a variable at a preceding level
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(487) : warning 219local variable "poruka" shadows a variable at a preceding level
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(499) : warning 219local variable "poruka" shadows a variable at a preceding level
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(513) : warning 219local variable "poruka" shadows a variable at a preceding level
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(535) : warning 219local variable "poruka" shadows a variable at a preceding level
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(551) : warning 219local variable "poruka" shadows a variable at a preceding level
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(572) : warning 219local variable "poruka" shadows a variable at a preceding level
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(616) : warning 219local variable "poruka" shadows a variable at a preceding level
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(642) : warning 219local variable "poruka" shadows a variable at a preceding level
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(682) : warning 219local variable "poruka" shadows a variable at a preceding level
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1388) : error 002only a single statement (or expressioncan follow each "case"
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1394) : warning 217loose indentation
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1396) : error 010invalid function or declaration
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1398) : error 010invalid function or declaration
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1399) : error 010invalid function or declaration
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1401) : error 010invalid function or declaration
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1403) : error 021symbol already defined"INI_ParseFile"
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1403) : error 017undefined symbol "playerid"
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1403) : error 010invalid function or declaration
C
:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(1403 -- 1409) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
9 Errors

Dialog Age:

PHP код:
case DIALOG_GODINE:
        {
            if(!
response) return Kick(playerid);
            {
                if(
response)
                {
                    switch(
listitem)
                    {
                        case 
0:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Godine",9);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene 9.");
                        }
                        case 
1:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Godine",10);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 10.");
                        }
                        case 
2:
                        {
                               new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",11);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 11.");
                        }
                        case 
3:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",12);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 12");
                        }
                        case 
4:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",13);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 13");
                        }
                        case 
5:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",14);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 14");
                        }
                        case 
6:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",15);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 15");
                        }
                        case 
7:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",16);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 16");
                        }
                        case 
8:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",16);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 16");
                        }
                        case 
9:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",17);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 17");
                        }
                        case 
10:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",18);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 18");
                        }
                        case 
11:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",19);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 19");
                        }
                        case 
12:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",20);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 20");
                        }
                        case 
13:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",21);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 21");
                        }
                        case 
14:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",22);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 22");
                        }
                        case 
15:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",23);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 23");
                        }
                        case 
16:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",24);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 24");
                        }
                        case 
17:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",25);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 25");
                        }
                        case 
18:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",26);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 26");
                        }
                        case 
19:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",27);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 27");
                        }
                        case 
20:
                        {
                               new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",28);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 28");
                        }
                        case 
21:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",29);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 29");
                        }
                        case 
22:
                        {
                            new 
INI:File INI_Open(UserPath(playerid));
                            
INI_WriteInt(File,"Spol",30);
                            
INI_Close(File);
                            
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 30");
                        }
                        {
                            
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","");
                        }
                    }
                }
            }
            return 
1;
         } 
Reply
#2

You made variables with the same name...
Reply
#3

How... ? Could you help me?
Reply
#4

You can't fit a dialog as an option within a switch, this bad.

PHP код:
case 22:
{
    new 
INI:File INI_Open(UserPath(playerid));
    
INI_WriteInt(File,"Spol",30);
    
INI_Close(File);
    
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 30");
}
/// ?
{
    
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","");

Try this:

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
        case 
DIALOG_GODINE:
        {
            if(!
response)
                return 
Kick(playerid);
            if(
response)
            {
                switch(
listitem)
                {
                    case 
0:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",9);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene 9.");
                      }
                    case 
1:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",10);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 10.");
                    }
                    case 
2:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",11);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 11.");
                    }
                    case 
3:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",12);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 12");
                    }
                    case 
4:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",13);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 13");
                    }
                    case 
5:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",14);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 14");
                    }
                    case 
6:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",15);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 15");
                    }
                    case 
7:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",16);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 16");
                    }
                    case 
8:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",16);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 16");
                    }
                    case 
9:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",17);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 17");
                    }
                    case 
10:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",18);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 18");
                    }
                    case 
11:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",19);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 19");
                    }
                    case 
12:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",20);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 20");
                    }
                    case 
13:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",21);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 21");
                    }
                    case 
14:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",22);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 22");
                    }
                    case 
15:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",23);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 23");
                    }
                    case 
16:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",24);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 24");
                    }
                    case 
17:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",25);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 25");
                    }
                    case 
18:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",26);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 26");
                    }
                    case 
19:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",27);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 27");
                    }
                    case 
20:
                    {
                           new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",28);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 28");
                    }
                    case 
21:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",29);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 29");
                    }
                    case 
22:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",30);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 30");
                        
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","");
                      }
                }
            }
        }
    }
    return 
true;

The warnings by "poruka" are a sign that you have a variable declared a variable with this name within a function and the other at the global level and the compiler does not find which read of these two, the solution would be to change a name.

Example bad code:

PHP код:
#include <a_samp>
new poruka;
public 
OnFilterScriptInit()
{
    new 
poruka;
    
poruka 5;
    return 
1;

fix:

PHP код:
#include <a_samp>
new poruka;
public 
OnFilterScriptInit()
{
    new 
other_name;
    
other_name 5;
    return 
1;

Reply
#5

Another one with switch, is

PHP код:
switch(n)
{
    case 
1:
    {
    }
    case 
2:
    {
    }
    default:
    {
    }

It was because you simply had it, without the default.

It's like chucking in a blank { } in the middle of code without a declaration, or a condition.
Reply
#6

Hey thank you for this. But when i check my scriptfiles I've got "sex" and "years" before name (data).

- Picture:

http://prntscr.com/6j8bpq

+ Everything else is under data.

- Sex dialog:

PHP код:
        case DIALOG_SPOL:
        {
            if(!
response) return Kick(playerid);
            else
            {
                switch(
listitem)
                {
                    
//Otvaramo caseove
                    
case 0:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Spol",0);
                        
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",1);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Odabrali ste spol: ћensko");
                    }
                }
                
ShowPlayerDialog(playeridDIALOG_GODINEDIALOG_STYLE_LIST,"Odaberite godine","9 Godina\n10 Godina\n11 Godina\n12 Godina\n13 Godina\n14 Godina\n15 Godina\n16 Godina\n17 Godina\n18 Godina\n19 Godina\n20 Godina\n21 Godina\n22 Godina\n23 Godina\n24 Godina\n25 Godina\n26 Godina\n27 Godina\n28 Godina\n29 Godina\n30 Godina","Odaberi","Izlaz");
            }
            return 
1;
        } 
Years dialog:

PHP код:
case DIALOG_GODINE:
        {
            if(!
response)
                return 
Kick(playerid);
            if(
response)
            {
                switch(
listitem)
                {
                    case 
0:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",9);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene 9.");
                      }
                    case 
2:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",11);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 11.");
                    }
                    case 
3:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",12);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 12");
                    }
                    case 
4:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",13);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 13");
                    }
                    case 
5:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",14);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 14");
                    }
                    case 
6:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",15);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 15");
                    }
                    case 
7:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",16);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 16");
                    }
                    case 
8:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",16);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 16");
                    }
                    case 
9:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",17);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 17");
                    }
                    case 
10:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",18);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 18");
                    }
                    case 
11:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",19);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 19");
                    }
                    case 
12:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",20);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 20");
                    }
                    case 
13:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",21);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 21");
                    }
                    case 
14:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",22);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 22");
                    }
                    case 
15:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",23);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 23");
                    }
                    case 
16:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",24);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 24");
                    }
                    case 
17:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",25);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 25");
                    }
                    case 
18:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",26);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 26");
                    }
                    case 
19:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",27);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 27");
                    }
                    case 
20:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",28);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 28");
                    }
                    case 
21:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",29);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 29");
                    }
                    case 
22:
                    {
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_WriteInt(File,"Godine",30);
                        
INI_Close(File);
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 30");
                    }
                }
                
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","");
            }
            return 
1;
        } 
Reply
#7

Add the tag after opening a file for to not have that problem, example:

PHP код:
new INI:File INI_Open(UserPath(playerid));
INI_SetTag(File"data"); //<-- add
INI_WriteInt(File,"Godine",27);
INI_Close(File); 
Try this:

PHP код:
case DIALOG_SPOL
        { 
            if(!
response) return Kick(playerid); 
            else 
            { 
                switch(
listitem
                { 
                    
//Otvaramo caseove 
                    
case 0
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Spol",0); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Odabrali ste spol: muљko"); 
                    } 
                    case 
1
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Spol",1); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Odabrali ste spol: ћensko"); 
                    } 
                } 
                
ShowPlayerDialog(playeridDIALOG_GODINEDIALOG_STYLE_LIST,"Odaberite godine","9 Godina\n10 Godina\n11 Godina\n12 Godina\n13 Godina\n14 Godina\n15 Godina\n16 Godina\n17 Godina\n18 Godina\n19 Godina\n20 Godina\n21 Godina\n22 Godina\n23 Godina\n24 Godina\n25 Godina\n26 Godina\n27 Godina\n28 Godina\n29 Godina\n30 Godina","Odaberi","Izlaz"); 
            } 
            return 
1
        } 

PHP код:
case DIALOG_GODINE
        { 
            if(!
response
                return 
Kick(playerid); 
            if(
response
            { 
                switch(
listitem
                { 
                    case 
0
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Godine",9); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene 9."); 
                      } 
                    case 
2
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Godine",11); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 11."); 
                    } 
                    case 
3
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Godine",12); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 12"); 
                    } 
                    case 
4
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Godine",13); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 13"); 
                    } 
                    case 
5
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Godine",14); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 14"); 
                    } 
                    case 
6
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Godine",15); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 15"); 
                    } 
                    case 
7
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Godine",16); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 16"); 
                    } 
                    case 
8
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Godine",16); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 16"); 
                    } 
                    case 
9
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");                        
                        
INI_WriteInt(File,"Godine",17); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 17"); 
                    } 
                    case 
10
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Godine",18); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 18"); 
                    } 
                    case 
11
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");                        
                        
INI_WriteInt(File,"Godine",19); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 19"); 
                    } 
                    case 
12
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Godine",20); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 20"); 
                    } 
                    case 
13
                    { 
                        new 
INI:File INI_Open(UserPath(playerid)); 
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Godine",21); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 21"); 
                    } 
                    case 
14
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");                        
                        
INI_WriteInt(File,"Godine",22); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 22"); 
                    } 
                    case 
15
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");                        
                        
INI_WriteInt(File,"Godine",23); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 23"); 
                    } 
                    case 
16
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Godine",24); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 24"); 
                    } 
                    case 
17
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Godine",25); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 25"); 
                    } 
                    case 
18
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Godine",26); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 26"); 
                    } 
                    case 
19
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Godine",27); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 27"); 
                    } 
                    case 
20
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Godine",28); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 28"); 
                    } 
                    case 
21
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Godine",29); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 29"); 
                    } 
                    case 
22
                    { 
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File"data");
                        
INI_WriteInt(File,"Godine",30); 
                        
INI_Close(File); 
                        
SendClientMessage(playerid,-1,"{00C0FF}WG:{FFFFFF} Godine uspjesno postavljene na 30"); 
                    } 
                } 
                
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",""); 
            } 
            return 
1
        } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)