Habe errors kriege die nicht raus

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
  • Guten Tag, also ich habe 3 Errors ich krieg die nicht raus kann mir vllt jemand weiter helfen?
    [/pwn]C:\Users\Tufan\Desktop\Selfmade!\gamemodes\meinselfmade.pwn(105) : error 017: undefined symbol "ocmd"
    [/pwn]C:\Users\Tufan\Desktop\Selfmade!\gamemodes\meinselfmade.pwn(120) : error 055: start of function body without function header
    [/pwn]C:\Users\Tufan\Desktop\Selfmade!\gamemodes\meinselfmade.pwn(121) : error 010: invalid function or declaration
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    3 Errors.


    ich probiere grade ein bissel zu scripten


  • if (strcmp(ocmd,"/fbitor",true) == 0)



    if(fbitor == 0)
    {
    MoveObject(fbitor,2237.6999511719, 2457, 11.5, 359.25, 359.49462890625,4.0);
    SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
    fbitor = 1;
    }
    else
    {
    MoveObject(fbitor,2237.6999511719, 2457, 11.5, 359.25, 359.49462890625,4.0);
    SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
    fbitor = 0;
    }
    {
    return 1;
    }

  • so muss der ocmd Aussehen
    ocmd:fbitor(playerid,param[])
    {
    if(fbitor == 0)
    {
    MoveObject(fbitor,2237.6999511719, 2457, 11.5, 359.25, 359.49462890625,4.0);
    SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
    fbitor = 1;
    }
    else
    {
    MoveObject(fbitor,2237.6999511719, 2457, 11.5, 359.25, 359.49462890625,4.0);
    SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
    fbitor = 0;
    }
    return 1;
    }
    du kannst den ocmd ihren wo Einfügen aba in kein public

  • if (strcmp(cmd,"/fbitor",true) == 0)
    {
    if(fbitor == 0)
    {
    MoveObject(fbitor,2237.6999511719, 2457, 11.5, 359.25, 359.49462890625,4.0);
    SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
    fbitor = 1;
    }
    else
    {
    MoveObject(fbitor,2237.6999511719, 2457, 11.5, 359.25, 359.49462890625,4.0);
    SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
    fbitor = 0;
    }
    return 1;
    }


    //edit : Text (2*)

  • ocmd ist eine eigene Befehlsform und gehört unter "OnPlayerText".


    Füg dort ein:



    ocmd:fbitor(playerid,params[])
    {
    if(fbitor == 0)
    {
    MoveObject(fbitor,2237.6999511719, 2457, 11.5, 359.25, 359.49462890625,4.0);
    SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
    fbitor = 1;
    }
    else
    {
    MoveObject(fbitor,2237.6999511719, 2457, 11.5, 359.25, 359.49462890625,4.0);
    SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
    fbitor = 0;
    }
    return 1;
    }


  • FALSCH!!!!!!!


    Ocmd muss!!!!! außerhalb eines Public's stehen!!!!



    //edit: ausdruck

  • also ich hab jetzt ganz unten da bekomme ich


    C:\Users\Tufan\Desktop\Selfmade!\gamemodes\meinselfmade.pwn(105) : error 029: invalid expression, assumed zero
    C:\Users\Tufan\Desktop\Selfmade!\gamemodes\meinselfmade.pwn(105 -- 106) : warning 215: expression has no effect
    C:\Users\Tufan\Desktop\Selfmade!\gamemodes\meinselfmade.pwn(106) : error 001: expected token: ";", but found "return"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.

  • public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;
    }


    ocmd:fbitor(playerid,param[])
    {
    if(fbitor == 0)
    {
    MoveObject(fbitor,2237.6999511719, 2457, 11.5, 359.25, 359.49462890625,4.0);
    SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
    fbitor = 1;
    }
    else
    {
    MoveObject(fbitor,2237.6999511719, 2457, 11.5, 359.25, 359.49462890625,4.0);
    SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
    fbitor = 0;
    }
    return 1;
    }

  • ocmd:fbitor(playerid,params[])//s vergessen
    {
    if(fbitor == 0)
    {
    MoveObject(fbitor,2237.6999511719, 2457, 11.5, 359.25, 359.49462890625,4.0);
    SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
    fbitor = 1;
    }
    else
    {
    MoveObject(fbitor,2237.6999511719, 2457, 11.5, 359.25, 359.49462890625,4.0);
    SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
    fbitor = 0;
    }
    return 1;
    }

  • bekomme immer noch errors
    ocmd:fbitor(playerid,param[])
    {
    if(fbitor == 0)
    {
    MoveObject(fbitor,2237.6999511719, 2457, 11.5, 359.25, 359.49462890625,4.0);
    SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
    fbitor = 1;
    }
    else
    {
    MoveObject(fbitor,2237.6999511719, 2457, 11.5, 359.25, 359.49462890625,4.0);
    SetTimerEx("PlaySoundForPlayer",2000,0,"id",playerid,1036);
    fbitor = 0;
    }
    return 1;
    }

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen