Dialog problem -
Deanol1099 - 27.06.2012
Nvm.
Re : Dialog problem -
Kindred - 27.06.2012
These are ALL self explanatory. Although I doubt it would take much time to look through these and fix them, I will only do so when you edit your post showing what lines the errors are on.
First off, define your dialog.
pawn Код:
#define DIALOG_TOYS placeadialogidherethatisnotalreadyinuse
Then, also define white.
Re: Re : Dialog problem -
Deanol1099 - 27.06.2012
Quote:
Originally Posted by Kindred
Snip.
|
I've narrowed it down to 2 errors now.
I just put the dialog id into the defines - still not working.
The next is a simple mistake, but I'm still having it.
Re: Dialog problem -
Kindred - 27.06.2012
pawn Код:
command(attach, playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_TOYS, DIALOG_STYLE_LIST, "Attach toys", "Briefcase\nFire Hydrant\nGas Pump\nWooden Crate\nSmall Buolder\nBBQ Grill\nBeer\nTelevision", "Select", "Cancel");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case 1:
{
if(!response)
{
SendClientMessage(playerid, WHITE, "You cancelled.");
return 1;
}
switch(listitem)
{
case 0:
{
AttachObjectToPlayer(1210, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
}
case 1:
{
AttachObjectToPlayer(1211, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
}
case 2:
{
AttachObjectToPlayer(1244, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
}
case 3:
{
AttachObjectToPlayer(1271, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
}
case 4:
{
AttachObjectToPlayer(1304, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
}
case 5:
{
AttachObjectToPlayer(1481, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
}
case 6:
{
AttachObjectToPlayer(1484, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
}
case 7:
{
AttachObjectToPlayer(1518, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
}
}
}
}
return 0;
}
Try this.
And the return 1; error makes no sense, is there a random other end bracket that would prevent the thing from continuing, or something?
EDIT: If the DIALOG_TOYS define thing doesn't work, are you sure that there is no other dialog id with the id of 1?
Re: Dialog problem -
Deanol1099 - 27.06.2012
K. The OnDialogResponse is okay now. Guess it was the command.
pawn Код:
command(attach, playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_TOYS, DIALOG_STYLE_LIST, "Attach toys", "Briefcase\nFire Hydrant\nGas Pump\nWooden Crate\nSmall Buolder\nBBQ Grill\nBeer\nTelevision", "Select", "Cancel");
}
return 1;
}
and my define for the 'Toys':
Still having problems with the return.