Tag mismatch, but don´t know why >.<

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link

  • new Menu:bsn;



    bsn = CreateMenu("bsn", 2, 375.9600, -68.2126, 1001.5151);
    AddMenuItem(bsn, 0, "Happy Meal");
    AddMenuItem(bsn, 1, "$50");
    AddMenuItem(bsn, 0, "Mini Menu");
    AddMenuItem(bsn, 1, "$100");
    AddMenuItem(bsn, 0, "Maxi Menu");
    AddMenuItem(bsn, 1, "$150");



    public OnPlayerSelectedMenuRow(playerid, row)
    {
    new Float:PlayerHealth;
    new Health = GetPlayerHealth(playerid, PlayerHealth);
    if(CurrentMenu == bsn)
    {
    switch(row)
    {
    case 0: //Happy Meal
    {
    SetPlayerHealth(playerid, PlayerHealth+25);
    GivePlayerMoney(playerid, -50);
    }
    case 1: //Mini Menu
    {
    SetPlayerHealth(playerid, PlayerHealth+50);
    GivePlayerMoney(playerid, -100);
    }
    case 2: //Maxi Menu
    {
    SetPlayerHealth(playerid, PlayerHealth+75);
    GivePlayerMoney(playerid, -150);
    }
    }
    }
    return 1;
    }


    [pwn]


    er sagt bei dieser Line " symbol is assigned a value that is never used: "Health" "


    [pwn]
    new Health = GetPlayerHealth(playerid, PlayerHealth);


    und bei dieser Line " tag mismatch "



    ShowMenuForPlayer(bsnmenu, playerid);

  • no way to go mit

    new Float:health;
    GetPlayerHealth(playerid,health);



    gibbet das

    C:\Dokumente und Einstellungen\Joker\Desktop\TEST.pwn(664) : error 017: undefined symbol "PlayerHealth"
    C:\Dokumente und Einstellungen\Joker\Desktop\TEST.pwn(669) : error 017: undefined symbol "PlayerHealth"
    C:\Dokumente und Einstellungen\Joker\Desktop\TEST.pwn(674) : error 017: undefined symbol "PlayerHealth"


    mit

    new Float:PlayerHealth;
    new Float:health;
    GetPlayerHealth(playerid,health);


    gibbet keine errors :P

  • Soo.. bekomme zwar keine Warnings, doch das menu wird nicht angezeigt :(
    So ist es im script


    Also ich habs jetzt ohne Warnings, doch es wird mir kein menü angezeigt:(



    new Menu:bsnmenu;
    new bsnpickup;



    bsnpickup = CreatePickup(1240, 2, 375.9600,-68.2126,1001.5151);



    bsnmenu = CreateMenu("bsn", 2, 375.9600, -68.2126, 1001.5151);
    AddMenuItem(bsnmenu, 0, "Happy Meal");
    AddMenuItem(bsnmenu, 1, "$50");
    AddMenuItem(bsnmenu, 0, "Mini Menu");
    AddMenuItem(bsnmenu, 1, "$100");
    AddMenuItem(bsnmenu, 0, "Maxi Menu");
    AddMenuItem(bsnmenu, 1, "$150");



    public OnPlayerSelectedMenuRow(playerid, row)
    {
    new Float:PlayerHealth;
    new Float:health;
    GetPlayerHealth(playerid,health);
    if(CurrentMenu == bsnmenu)
    {
    switch(row)
    {
    case 0: //Happy Meal
    {
    SetPlayerHealth(playerid, PlayerHealth+25);
    GivePlayerMoney(playerid, -50);
    }
    case 1: //Mini Menu
    {
    SetPlayerHealth(playerid, PlayerHealth+50);
    GivePlayerMoney(playerid, -100);
    }
    case 2: //Maxi Menu
    {
    SetPlayerHealth(playerid, PlayerHealth+75);
    GivePlayerMoney(playerid, -150);
    }
    }
    }
    return 1;
    }




    if(pickupid == bsnpickup)
    {
    ShowMenuForPlayer(bsnmenu, playerid);
    }
    return 1;
    }