Error

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
  • Hallo ich habe 2 errors


    C:\Users\Patrick\Desktop\Reallife.pwn(172) : error 010: invalid function or declaration
    C:\Users\Patrick\Desktop\Reallife.pwn(176) : error 010: invalid function or declaration
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.



    Die zeilen


    if (strcmp("/showme", cmdtext, true, 10) == 0) Das ist zeile 172


    return 1; und das ist 176



    falls ihr den ganzen befehlt braucht um zu sehen was falsch ist:


    if (strcmp("/showme", cmdtext, true, 10) == 0)
    {
    ShowMenuForPlayer(showme, playerid);


    return 1;
    }
    Wäre nett wen ihr mir helfen könnt.
    mfg.

  • zeig mal das Menü von Showme.
    Ich glaub ich weiß woran es liegt ;>

  • Also ich poste mal alles was ich von showme riengetan habe.


    new Menu:showme;


    showme = CreateMenu("Color", 2, 200.0, 100.0, 150.0, 150.0);
    AddMenuItem(showme, 0, "Grey");
    AddMenuItem(showme, 0, "Purple");
    AddMenuItem(showme, 0, "Darkblue");
    AddMenuItem(showme, 0, "Yellow");
    AddMenuItem(showme, 0, "Red");
    AddMenuItem(showme, 0, "Green");
    AddMenuItem(showme, 0, "Lightgreen");
    AddMenuItem(showme, 0, "Orange");
    AddMenuItem(showme, 0, "Lightyellow");
    AddMenuItem(showme, 0, "Invisible");


    new Menu:CurrentMenu = GetPlayerMenu(playerid);
    if(CurrentMenu == showme)
    {
    switch(row)
    {
    case 0:
    {
    SetPlayerColor(playerid, COLOR_GREY);
    SendClientMessage(playerid, COLOR_GREY, "Color");
    TogglePlayerControllable(playerid, true);
    }
    case 1:
    {
    SetPlayerColor(playerid, COLOR_PURPLE);
    SendClientMessage(playerid, COLOR_PURPLE, "Color");
    TogglePlayerControllable(playerid, true);
    }
    case 2:
    {
    SetPlayerColor(playerid, COLOR_DBLUE);
    SendClientMessage(playerid, COLOR_DBLUE, "Color");
    TogglePlayerControllable(playerid, true);
    }
    case 3:
    {
    SetPlayerColor(playerid, COLOR_YELLOW);
    SendClientMessage(playerid, COLOR_YELLOW, "Color");
    TogglePlayerControllable(playerid, true);
    }
    case 4:
    {
    SetPlayerColor(playerid, COLOR_RED);
    SendClientMessage(playerid, COLOR_RED, "Color");
    TogglePlayerControllable(playerid, true);
    }
    case 5:
    {
    SetPlayerColor(playerid, COLOR_GREEN);
    SendClientMessage(playerid, COLOR_GREEN, "Color");
    TogglePlayerControllable(playerid, true);
    }
    case 6:
    {
    SetPlayerColor(playerid, COLOR_LIGHTGREEN);
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "Color");
    TogglePlayerControllable(playerid, true);
    }
    case 7:
    {
    SetPlayerColor(playerid, COLOR_ORANGE);
    SendClientMessage(playerid, COLOR_ORANGE, "Color");
    TogglePlayerControllable(playerid, true);
    }
    case 8:
    {
    SetPlayerColor(playerid, COLOR_YELLOW2);
    SendClientMessage(playerid, COLOR_YELLOW2, "Color");
    TogglePlayerControllable(playerid, true);
    }
    case 9:
    {
    SetPlayerColor(playerid, TEAM_HIT_COLOR);
    SendClientMessage(playerid, TEAM_HIT_COLOR, "invisible");
    TogglePlayerControllable(playerid, true);
    }
    }
    }

  • Ist das dein erstes Menu ?
    Wenn dann versuche mal das:



    new Menu:current2;
    current2 = GetPlayerMenu(playerid);
    if(current2 == showme)
    {
    switch(row)
    {
    case 0:
    {
    SetPlayerColor(playerid, COLOR_GREY);
    SendClientMessage(playerid, COLOR_GREY, "Color");
    TogglePlayerControllable(playerid, true);
    }
    case 1:
    {
    SetPlayerColor(playerid, COLOR_PURPLE);
    SendClientMessage(playerid, COLOR_PURPLE, "Color");
    TogglePlayerControllable(playerid, true);
    }
    case 2:
    {
    SetPlayerColor(playerid, COLOR_DBLUE);
    SendClientMessage(playerid, COLOR_DBLUE, "Color");
    TogglePlayerControllable(playerid, true);
    }
    case 3:
    {
    SetPlayerColor(playerid, COLOR_YELLOW);
    SendClientMessage(playerid, COLOR_YELLOW, "Color");
    TogglePlayerControllable(playerid, true);
    }
    case 4:
    {
    SetPlayerColor(playerid, COLOR_RED);
    SendClientMessage(playerid, COLOR_RED, "Color");
    TogglePlayerControllable(playerid, true);
    }
    case 5:
    {
    SetPlayerColor(playerid, COLOR_GREEN);
    SendClientMessage(playerid, COLOR_GREEN, "Color");
    TogglePlayerControllable(playerid, true);
    }
    case 6:
    {
    SetPlayerColor(playerid, COLOR_LIGHTGREEN);
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "Color");
    TogglePlayerControllable(playerid, true);
    }
    case 7:
    {
    SetPlayerColor(playerid, COLOR_ORANGE);
    SendClientMessage(playerid, COLOR_ORANGE, "Color");
    TogglePlayerControllable(playerid, true);
    }
    case 8:
    {
    SetPlayerColor(playerid, COLOR_YELLOW2);
    SendClientMessage(playerid, COLOR_YELLOW2, "Color");
    TogglePlayerControllable(playerid, true);
    }
    case 9:
    {
    SetPlayerColor(playerid, TEAM_HIT_COLOR);
    SendClientMessage(playerid, TEAM_HIT_COLOR, "invisible");
    TogglePlayerControllable(playerid, true);
    }
    }
    }
    return 1;
    }