dialog problems
#1

Hey guys im having problems with my dialogs with this errors i cant find them:

Код:
C:\Users\Solmileidis Garcia\Desktop\Jesus\Clean Server\gamemodes\GTASARPG.pwn(999 -- 1000) : error 001: expected token: ",", but found ";"
C:\Users\Solmileidis Garcia\Desktop\Jesus\Clean Server\gamemodes\GTASARPG.pwn(1001 -- 1002) : error 001: expected token: ",", but found ";"
C:\Users\Solmileidis Garcia\Desktop\Jesus\Clean Server\gamemodes\GTASARPG.pwn(1003 -- 1004) : error 001: expected token: ",", but found ";"
C:\Users\Solmileidis Garcia\Desktop\Jesus\Clean Server\gamemodes\GTASARPG.pwn(1005 -- 1006) : error 001: expected token: ",", but found ";"
C:\Users\Solmileidis Garcia\Desktop\Jesus\Clean Server\gamemodes\GTASARPG.pwn(1007 -- 1008) : error 001: expected token: ",", but found ";"
C:\Users\Solmileidis Garcia\Desktop\Jesus\Clean Server\gamemodes\GTASARPG.pwn(1009 -- 1010) : error 001: expected token: ",", but found ";"
C:\Users\Solmileidis Garcia\Desktop\Jesus\Clean Server\gamemodes\GTASARPG.pwn(1011 -- 1012) : error 001: expected token: ",", but found ";"
C:\Users\Solmileidis Garcia\Desktop\Jesus\Clean Server\gamemodes\GTASARPG.pwn(1013 -- 1014) : error 001: expected token: ",", but found ";"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


8 Errors.
Another thing, how can i do with my tutorial rules because only shows me 1 rule, how can i fix it? thanks in advance.
Reply
#2

anyone can give me some advice please?
Reply
#3

Why the heck you have one showplayerdialog in two lines and then the worst thing is that you're putting comma on end of the line but that function doesn't have that much parameters. Shortly - you can't make it in two lines and with commas on the end of first one
Reply
#4

PHP код:
ShowDialog(playeridDIALOG_TUTODIALOG_STYLE_MSGBOX"{0092FF}|____ Fin ____|""{0092FF} Felicidades! {FFFFFF} por llegar hasta el final. Si necesita mбs ayuda, use {0092FF} /n {FFFFFF} para hacer preguntas relacionadas con el juego.\n\nEl tono de estas reglas puede que suenen es un poco severo, pero {0092FF} no son irrazonables. {FFFFFF} \n\nPara participar en la comunidad {0092FF} {FFFFFF} y para obtener mбs informaciуn, visite el sitio web:\n\n {0092FF} www.gtasa-rpg.com","Jugar",""
"{0092FF}|____ The End ____|""{0092FF}Congrats! {FFFFFF}for making it to the end. If you need any further help use {0092FF}/n{FFFFFF} to ask any game related questions.\n\nThe tone of these rules is a bit harsh, but they {0092FF}aren't unreasonable.{FFFFFF}\n\nTo involve yourself in the {0092FF}community {FFFFFF}and for more info, check out the website:\n\n{0092FF}www.gtasa-rpg.com","Play",""
No idea what you're trying to do like that lol....

ShowPlayerDialog only has 7 arguments

PHP код:
ShowPlayerDialog(playeriddialogidstylecaption[], info[], button1[], button2[]); 
So you can't just put another caption, info and buttons.

You'll need to make a button to move onto the next dialog or a timer to automatically move it on.

In short, you can't do what you're doing, you have to do it like this.

PHP код:
if(dialogid == dialog1) { ShowPlayerDialog(playeriddialog2stylecaption[], info[], button1[], button2[]); }
if(
dialogid == dialog2 ShowPlayerDialog(playeriddialog3stylecaption[], info[], button1[], button2[]); }
/*etc...*/ 
You're can't do this

PHP код:
if(dialogid == dialog1
{
    
ShowPlayerDialog(playeriddialog2stylecaption[], info[], button1[], button2[], 
    
caption[], info[], button1[], button2[]);

Hope you understand what I'm saying
Reply
#5

You can do them using strcat
pawn Код:
//on player registration
        format(string, sizeof(string), "{FFFFFF}LEA ESTAS REGLAS. NO OBEDECERLAS PROVOCARA QUE TERMINES {FF0000}BANEADO.\n\n");
        strcat(str, string);
        format(string, sizeof(string), "{FFFFFF}La ignorancia no es excusa, todas estas cosas usted ya las debe saber.\n\n");
        strcat(str, string);
        format(string, sizeof(string), "Si rompes alguna de las reglas descritas aquн, {FF0000}NO SERAS DESBANEADO.");
        strcat(str, string);
        ShowPlayerDialog(playerid, DIALOG_TUTO1, DIALOG_STYLE_MSGBOX, "{0092FF}|____ El Comienzo ____|", str, "Siguiente", "Saltar");
//ondialogresponse

        case DIALOG_TUTO1:
        {
                format(string, sizeof(string), "{FFFFFF}Este servidor es un {0092FF}servidor RP {FFFFFF}lo que significa {0092FF}Role Playing.\n\n");
                strcat(str, string);
                format(string, sizeof(string), "{FFFFFF}Deathmatching, o DMing,  {FF0000}NO ESTA PERMITIDO. {FFFFFF}Deathmatching significa matar a alguien sin ninguna razуn, sin ninguna justificaciуn de carбcter.\n");
                strcat(str, string);
                format(string, sizeof(string), "Si solo quieres pelear, hay otros servidores para eso. Aquн, si quieres matar a alguien, necesitas tener una razуn.\n\n");
                strcat(str, string);
                format(string, sizeof(string), "Si viola esta regla provocaras como consecuencia como que te multen {FF0000}(FINED) {FFFFFF}/ te saquen del servidor {FF0000}(KICKED) {FFFFFF}/ te encierren como penalizacion {FF0000}(JAILED) {FFFFFF}o te den una advertencia {FF0000}(WARNING).\n\n");
                strcat(str, string);
                format(string, sizeof(string), "{FFFFFF}Hacer esto una y otra vez provocaras que te {FFFFFF}prohiban del servidor {FF0000}(BANNED). {FFFFFF}\n\n");
                strcat(str, string);
                format(string, sizeof(string), "Pero no te preocupes, hay miles de razones para matar personas por aqui.\n\n");
                strcat(str, string);
                format(string, sizeof(string), "Pretender hacer un {0092FF}ROL {FFFFFF}de una persona loca o un policia maton {FF0000}NO TE DA UNA RAZУN  {FFFFFF}para hacer Deathmatch (matar a alguien).");
                strcat(str, string);
                ShowPlayerDialog(playerid, DIALOG_TUTO2, DIALOG_STYLE_MSGBOX, "{0092FF}|____ El Combate a Muerte ____|", str, "Siguiente", "Saltar");
        }
        case DIALOG_TUTO2:
        {
            //tutorial messages
            //showplayerdialog DIALOG_TUTO3
        }
        case DIALOG_TUTO3:
        {
            //tutorial messages
            //showplayerdialog DIALOG_TUTO4
        }
Continue doing like that until you finish tutorial! Make sure at the end of tutorial to spawn the player or do whatever you'd like with them!
ShowPlayerDialog is a one-time use, you cannot show 2 or more dialogs in the same time.
Here's a example:

pawn Код:
CMD:showmeonedialog(playerid)
{
    ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Dialog one", "Here's a dialog!", "Okay", "Close");
    return 1;
}

CMD:showmetwodialog(playerid, params[])
{
    if(strcmp(params, "1", true))
    {
        ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_MSGBOX, "Dialog", "This is dialog number one!", "Okay", "Close");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_MSGBOX, "Dialog", "This is dialog number two!", "Okay", "Close");
    }
    return 1;
}
You can't do them like this:

pawn Код:
CMD:dialog(playerid) // i used a command just to show you! This might cause a crash or show no dialog!
{
    ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_MSGBOX, "Dialog", "This is dialog number one!", "Okay", "Close");
    ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_MSGBOX, "Dialog", "This is dialog number two!", "Okay", "Close");
    return 1;
}
Edit:
If you want to use more than one language then you'll have to do a variable just for that and use if or else if

pawn Код:
new Language[MAX_PLAYERS] = 0; //0 = english, 1 = spanish or whatever language that is.

if(Language[playerid] == 0)
{
    //showplayerdialog in english language
}
else
{
    //showplayerdialog in spanish language
}
But this will make you do a language selection before the tutorial.
Reply
#6

Quote:
Originally Posted by ConnorW
Посмотреть сообщение
You can do them using strcat
pawn Код:
//on player registration
        format(string, sizeof(string), "{FFFFFF}LEA ESTAS REGLAS. NO OBEDECERLAS PROVOCARA QUE TERMINES {FF0000}BANEADO.\n\n");
        strcat(str, string);
        format(string, sizeof(string), "{FFFFFF}La ignorancia no es excusa, todas estas cosas usted ya las debe saber.\n\n");
        strcat(str, string);
        format(string, sizeof(string), "Si rompes alguna de las reglas descritas aquн, {FF0000}NO SERAS DESBANEADO.");
        strcat(str, string);
        ShowPlayerDialog(playerid, DIALOG_TUTO1, DIALOG_STYLE_MSGBOX, "{0092FF}|____ El Comienzo ____|", str, "Siguiente", "Saltar");
//ondialogresponse

        case DIALOG_TUTO1:
        {
                format(string, sizeof(string), "{FFFFFF}Este servidor es un {0092FF}servidor RP {FFFFFF}lo que significa {0092FF}Role Playing.\n\n");
                strcat(str, string);
                format(string, sizeof(string), "{FFFFFF}Deathmatching, o DMing,  {FF0000}NO ESTA PERMITIDO. {FFFFFF}Deathmatching significa matar a alguien sin ninguna razуn, sin ninguna justificaciуn de carбcter.\n");
                strcat(str, string);
                format(string, sizeof(string), "Si solo quieres pelear, hay otros servidores para eso. Aquн, si quieres matar a alguien, necesitas tener una razуn.\n\n");
                strcat(str, string);
                format(string, sizeof(string), "Si viola esta regla provocaras como consecuencia como que te multen {FF0000}(FINED) {FFFFFF}/ te saquen del servidor {FF0000}(KICKED) {FFFFFF}/ te encierren como penalizacion {FF0000}(JAILED) {FFFFFF}o te den una advertencia {FF0000}(WARNING).\n\n");
                strcat(str, string);
                format(string, sizeof(string), "{FFFFFF}Hacer esto una y otra vez provocaras que te {FFFFFF}prohiban del servidor {FF0000}(BANNED). {FFFFFF}\n\n");
                strcat(str, string);
                format(string, sizeof(string), "Pero no te preocupes, hay miles de razones para matar personas por aqui.\n\n");
                strcat(str, string);
                format(string, sizeof(string), "Pretender hacer un {0092FF}ROL {FFFFFF}de una persona loca o un policia maton {FF0000}NO TE DA UNA RAZУN  {FFFFFF}para hacer Deathmatch (matar a alguien).");
                strcat(str, string);
                ShowPlayerDialog(playerid, DIALOG_TUTO2, DIALOG_STYLE_MSGBOX, "{0092FF}|____ El Combate a Muerte ____|", str, "Siguiente", "Saltar");
        }
        case DIALOG_TUTO2:
        {
            //tutorial messages
            //showplayerdialog DIALOG_TUTO3
        }
        case DIALOG_TUTO3:
        {
            //tutorial messages
            //showplayerdialog DIALOG_TUTO4
        }
Continue doing like that until you finish tutorial! Make sure at the end of tutorial to spawn the player or do whatever you'd like with them!
ShowPlayerDialog is a one-time use, you cannot show 2 or more dialogs in the same time.
Here's a example:

pawn Код:
CMD:showmeonedialog(playerid)
{
    ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Dialog one", "Here's a dialog!", "Okay", "Close");
    return 1;
}

CMD:showmetwodialog(playerid, params[])
{
    if(strcmp(params, "1", true))
    {
        ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_MSGBOX, "Dialog", "This is dialog number one!", "Okay", "Close");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_MSGBOX, "Dialog", "This is dialog number two!", "Okay", "Close");
    }
    return 1;
}
You can't do them like this:

pawn Код:
CMD:dialog(playerid) // i used a command just to show you! This might cause a crash or show no dialog!
{
    ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_MSGBOX, "Dialog", "This is dialog number one!", "Okay", "Close");
    ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_MSGBOX, "Dialog", "This is dialog number two!", "Okay", "Close");
    return 1;
}
Edit:
If you want to use more than one language then you'll have to do a variable just for that and use if or else if

pawn Код:
new Language[MAX_PLAYERS] = 0; //0 = english, 1 = spanish or whatever language that is.

if(Language[playerid] == 0)
{
    //showplayerdialog in english language
}
else
{
    //showplayerdialog in spanish language
}
But this will make you do a language selection before the tutorial.
thanks alot pal, very usefull
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)