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");
}
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.
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.
|
// name dialog id
#define buy0 102
#define buy1 103
#define sel2 104
#define sel3 105
u need to define all dialogs
pawn Code:
|
#define DIALOG_WEAPONS #if defined FILTERSCRIPT #define DIALOG SEL0 #define DIALOG_SEL1 #define DIALOG_SEL2 #define DIALOG_SEL3 #define DIALOG_SEL4
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Shop" " & handguns\es\nGrades & amor etc\nChange skin\nAccessories\t" "Buy" "Cancel");
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.
}
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.