Ich habe ein Problem mit Untermenüs:
ganz oben
new Menu:Auto;
new Menu:Sport;
new Menu:Alpha;
gamemode
Auto = CreateMenu("Auto",2,200.0,100.0,150.0,150.0);
AddMenuItem(Auto,0, "Sport");
Sport = CreateMenu("Sport",2,200.0,100.0,150.0,150.0);
AddMenuItem(Sport,0,"Alpha");
Menu row
public OnPlayerSelectedMenuRow(playerid, row)
{
TogglePlayerControllable(playerid,0);
new Menu:Menu = GetPlayerMenu(playerid);
new Float:x,Float:y,Float:z;
new Float:rot;
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid,rot);
if(Menu == Auto)
{
switch(row)
{
case 0:// Sport
{
ShowMenuForPlayer(Sport,playerid);
}
if(Menu == Alpha)
{
CreateVehicle(602,x,y,z,rot,-1,-1,-1);
{
}
}
return 1;
}
Bekomme diese Errors / Warnings
Zitatgamemodes\car.pwn(82) : error 002: only a single statement (or expression) can follow each "case"
gamemodes\car.pwn(82 -- 83) : error 028: invalid subscript (not an array or too many subscripts): "Menu"
gamemodescar.pwn(84) : warning 217: loose indentation
gamemodes\car.pwn(85) : warning 217: loose indentation
Bezieht sich auf:
1.if(Menu == Alpha)
2.if(Menu == Alpha)
{
3.CreateVehicle(602,x,y,z,rot,-1,-1,-1);
4.{
Also der Teil
if(Menu == Alpha)
{
CreateVehicle(602,x,y,z,rot,-1,-1,-1);
{
Sagt mir bitte wo der Fehler ist und wie ich ihn beheben kann.