Does it works? [Dialogs]
#1

Hi!

I have work with dialogs for very long now with out asking for help!..

And I fixed it..


But now when I try to do another thing with dialogs it won't work, so I wounder if it works to do like this:

pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_WEAPONS)
    {
        if(response) // If they clicked 'Select' or double-clicked a weapon
        {
            // Give them the weapon
            if(listitem == 0) // They selected the first item - Desert Eagle
            {
                ShowPlayerDialog(playerid, DIALOG_BUY0, DIALOG_STYLE_LIST, "Shotguns & handguns", "9mm 150$\nSilenced 9mm 250$\nDesert Eagle\nShotgun\nSawnoff Shotgun 600$\nCombat Shotgun 200$\nMicro SMG/Uzi 350$\nMP5 250$\t", "Buy", "Close");
            }
But I get error that it's not defined.. When I tired to define it, it still didn't workt...
Reply
#2

You have the definition files required for it to work?
Reply
#3

Quote:
Originally Posted by Mafioso97
View Post
You have the definition files required for it to work?
Hmm I don't know, it workt when I defined another thing..


Thanks alot for very fast reply ..

Edit:


Error codes:

Code:
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(44) : error 029: invalid expression, assumed zero
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(51) : error 017: undefined symbol "DIALOG_BUY0"
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(55) : error 017: undefined symbol "DIALOG_BUY1"
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(59) : error 017: undefined symbol "DIALOG_SEL2"
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(61) : warning 217: loose indentation
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(63) : error 017: undefined symbol "DIALOG_SEL3"
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(67) : error 017: undefined symbol "DIALOG_SEL4"
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(75) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
Reply
#4

What have you got for your definitions? Top of the script.
Reply
#5

Quote:
Originally Posted by Mafioso97
View Post
What have you got for your definitions? Top of the script.
#define DIALOG_WEAPONS


Edit I read wrong before, yes the defines are at the top.
Reply
#6

You need to define other Dialogs: DIALOG_BUY0, DIALOG_BUY1, DIALOG_SELL etc. Or you can use numbers instade but you can get lost. Just define other dialogs and it will be fixed.
Reply
#7

Quote:
Originally Posted by B-Matt
View Post
You need to define other Dialogs: DIALOG_BUY0, DIALOG_BUY1, DIALOG_SELL etc. Or you can use numbers instade but you can get lost. Just define other dialogs and it will be fixed.
I tried to define but didn't helpt.. But I will try again later. First I have ShowPlayerDialog
and on OnDilogResponse I have dialogs as responds, I thin I know where the problem got from I don't have anything after that..
Because i don't have any respond to them...
Reply
#8

Sorry for bumb but I forgot to bumb it earlier..

That didn't helpt (That above) I want another dialog to show up in a dialog.

Maybe some easy mistake I've done ^^ ...
Reply
#9

u need to define all dialogs

pawn Code:
//        name dialog id  
#define buy0 102
#define buy1 103
#define sel2 104
#define sel3 105
can u show the entire dialog re cause i see more errors than what u show
Reply
#10

Quote:
Originally Posted by Glad2BeHere
View Post
u need to define all dialogs

pawn Code:
//        name dialog id  
#define buy0 102
#define buy1 103
#define sel2 104
#define sel3 105
can u show the entire dialog re cause i see more errors than what u show
Sure:

Defines:

Code:
 #define DIALOG_WEAPONS
#if defined FILTERSCRIPT
#define DIALOG SEL0
#define DIALOG_SEL1
#define DIALOG_SEL2
#define DIALOG_SEL3
#define DIALOG_SEL4
OnFilterScriptInt
pawn Code:
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Shop" " & handguns\es\nGrades & amor etc\nChange skin\nAccessories\t" "Buy" "Cancel");
OnDialogResponse

pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_WEAPONS)
    {
        if(response) // If they clicked 'Select' or double-clicked a weapon
        {
            // Give them the weapon
            if(listitem == 0) // They selected the first item - Desert Eagle
            {
                ShowPlayerDialog(playerid, DIALOG_BUY0, DIALOG_STYLE_LIST, "Shotguns & handguns", "9mm 150$\nSilenced 9mm 250$\nDesert Eagle\nShotgun\nSawnoff Shotgun 600$\nCombat Shotgun 200$\nMicro SMG/Uzi 350$\nMP5 250$\t", "Buy", "Close");
            }
            if(listitem == 1) //1
            {
                ShowPlayerDialog(playerid, DIALOG_BUY1, DIALOG_STYLE_LIST, "Rifles", "Country Rifle 200$\nSniper Rifle 400$\t", "Buy" "Close");
            }
            if(listitem == 2) //2
            {
                ShowPlayerDialog(playerid, DIALOG_SEL2, DIALOG_STYLE_LIST, "Grenades & armor etc", "Grenades 250$\nMolotov Cocktail 350$\nArmor 150$", "Buy" "Close");
            }
              if(listitem == 3) //3
            {
                 ShowPlayerDialog(playerid, DIALOG_SEL3, DIALOG_STYLE_LIST, "Change skin", "Hobo skin 3000$\nVarios Los Aztecas 2 3000\nCluckin' Bell Worker 2000$\t", "Buy" "Close");
            }
              if(listitem == 4) //4
            {
                ShowPlayerDialog(playerid, DIALOG_SEL4, DIALOG_STYLE_LIST, "Accessories", "Hat", "Buy" "Close");
            }
        }
        return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
        }
        return 0; // You MUST return 0 here! Just like OnPlayerCommandText.
}

Errors:


Code:
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(49) : error 029: invalid expression, assumed zero
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(56) : error 017: undefined symbol "DIALOG_BUY0"
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(60) : error 017: undefined symbol "DIALOG_BUY1"
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(64) : error 017: undefined symbol "DIALOG_SEL2"
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(66) : warning 217: loose indentation
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(68) : error 017: undefined symbol "DIALOG_SEL3"
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(72) : error 017: undefined symbol "DIALOG_SEL4"
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\FilterScript.pwn(77) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)