Hey,
habe vorhin an nem Dialog Waffen System für mein DM Script gearbeitet hier der Error der plötzlich auftrat :
Zitaterror 002: only a single statement (or expression) can follow each "case"
Nun die Zeilen :
switch(dialogid==DIALOG_W)
{
case 1:
{
if(!response)
{
SendClientMessage(playerid, COLOR_RED, "Vorgang Abbgebrochen");
return 1;
}
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid,DIALOG_HANDWAFFEN,DIALOG_STYLE_LIST,"Nahkampf Waffen","Baseballschläger\nKatana\nMesser","OK","Abbrechen");
}
case 1:
{
ShowPlayerDialog(playerid,DIALOG_PISTOLEN,DIALOG_STYLE_LIST,"Pistolen","Deagle\n9mm Silence\n9mm","OK","Abbrechen");
}
case 2:
{
ShowPlayerDialog(playerid,DIALOG_MG,DIALOG_STYLE_LIST,"Maschienengewehre","AK - 47\nM4","OK","Abbrechen");
}
case 3:
{
ShowPlayerDialog(playerid,DIALOG_UZI,DIALOG_STYLE_LIST,"Uzis","MP5\nMicro SMG\nTec 9","OK","Abbrechen");
}
case 4:
{
ShowPlayerDialog(playerid,DIALOG_G,DIALOG_STYLE_LIST,"Gewehre","Country Rifle\nSniper","OK","Abbrechen");
}
case 5:
{
ShowPlayerDialog(playerid,DIALOG_WURFWAFFEN,DIALOG_STYLE_LIST,"Wurfwaffen","Molotov Cocktail\nGranate","OK","Abbrechen");
}
}
}
else switch(dialogid==DIALOG_HANDWAFFEN)//HIER IST DER FEHLER!!!!
{
case 1:
{
if(!response)
{
SendClientMessage(playerid, COLOR_RED, "Vorgang Abbgebrochen");
return 1;
}
switch(listitem)
{
case 0:
{
if(GetPlayerMoney(playerid) >= 1000)
{
GivePlayerMoney(playerid,-1000);
GivePlayerWeapon(playerid,5,1);
SendClientMessage(playerid,COLOR_WHITE,"HGW Du hast einen Baseballschläger gekauft");
}
else
{
SendClientMessage(playerid,COLOR_RED,"Du hast nicht genug Geld");
}
}
case 1:
{
if(GetPlayerMoney(playerid) >= 10000)
{
GivePlayerMoney(playerid,-10000);
GivePlayerWeapon(playerid,8,1);
SendClientMessage(playerid,COLOR_WHITE,"HGW Du hast eine Katana gekauft");
}
else
{
SendClientMessage(playerid,COLOR_RED,"Du hast nicht genug Geld");
}
}
case 3:
{
if(GetPlayerMoney(playerid) >= 2500)
{
GivePlayerMoney(playerid,-2500);
GivePlayerWeapon(playerid,4,1);
SendClientMessage(playerid,COLOR_WHITE,"HGW Du hast ein Messer gekauft");
}
else
{
SendClientMessage(playerid,COLOR_RED,"Du hast nicht genug Geld");
}
}
}
}
Wäre nett wenn mir einer helfen falls nötig Teamviewer Daten per PN...
MFG
/edit Skype ist auch vorhanden also falls ihr dir daten per skype wolte vom TV