22.02.2012, 05:12
you have to add
how can you use cases without knowing what you are switching them for?
you also miss one bracket
this should be the correct one.
also, try to indent codes better.
pawn Код:
switch(listitem)
you also miss one bracket
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
switch(listitem)
{
case 1:
{
SetPlayerFightingStyle(playerid, 4);
}
case 2:
{
SetPlayerFightingStyle(playerid, 5);
}
case 3:
{
SetPlayerFightingStyle(playerid, 6);
}
case 4:
{
SetPlayerFightingStyle(playerid, 7);
}
case 5:
{
SetPlayerFightingStyle(playerid, 15);
}
case 6:
{ // <-- missing bracket
SetPlayerFightingStyle(playerid, 26);
}
}
}
return 1;
}
also, try to indent codes better.