Hilfe bitte tor system ^^

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
  • Hey , ich wollte ein Tor erstellen aber da kommen 2 errors !


    C:\Users\NoRain\Desktop\Test\gamemodes\WorldOfRedApple.pwn(1024) : error 010: invalid function or declaration
    C:\Users\NoRain\Desktop\Test\gamemodes\WorldOfRedApple.pwn(1028) : error 010: invalid function or declaration
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.



    und Die Zeilen sind !


    if (strcmp("/hitbase", cmdtext, true, 10) == 0) ------------> ERROR 1
    {
    MoveObject(tGate,1411.0688476563, -1891.7446289063, 12.772193908691,2.0);des Gates!
    SetTimer("GateClosetGate",5000,0);in Ms!


    return 1;-------------------------------------->ERROR 2
    }




    Ich hoffe ihr könnt mir helfen ^^ !

  • cmdtext, true) == 0)mach mal das


    if (strcmp("/hitbase", cmdtext, true) == 0)


    {
    MoveObject(tGate,1411.0688476563, -1891.7446289063, 12.772193908691,2.0);SetTimer("GateClosetGate",5000,0);return 1; }

  • Code
    if(strcmp(cmd, "/hitbase", cmdtext, true) == 0)
    {
    MoveObject(tGate,1411.0688476563, -1891.7446289063, 12.772193908691,2.0);
    SetTimer("GateClosetGate",5000,0);
    return 1;
    }

    2 Mal editiert, zuletzt von Mr.FreaK007 ()

  • Nein TeamSpirit.
    Es reicht von:
    if (strcmp("/hitbase", cmdtext, true, 10) == 0)
    machen auf
    if (strcmp("/hitbase", cmdtext, true, 8) == 0)
    Da /hitbase genau 8Zeichen enthält net 10 =P
    und falls das nicht geht so:
    if(strcmp(cmdtext,"/hitbase",true)==0)

    Why do programmers always mix up Halloween and Christmas?
    Oct 31 == Dec 25

  • Wenn dann 7 da Slash net mitzählt
    //oder irr ich mich da?

    es ist besser keine zahl bei solchen commands ohne parameters hinzuklatschen

  • kommt immer noch .... :(


    C:\Users\NoRain\Desktop\Test\gamemodes\WorldOfRedApple.pwn(1024) : error 010: invalid function or declaration
    C:\Users\NoRain\Desktop\Test\gamemodes\WorldOfRedApple.pwn(1029) : error 010: invalid function or declaration
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.



    if (strcmp("/hitbase", cmdtext, true) == 0) ----------------->Error
    {
    MoveObject(tGate,1411.0688476563, -1891.7446289063, 12.772193908691,2.0);des Gates!
    SetTimer("GateClosetGate",5000,0);in Ms!


    return 1;----------------->Error

  • Teamspirit doch wird mitgezählt nur bei DCMD nicht.
    Eine Frage: Hast du es so im Script mal versucht:


    if(strcmp(cmdtext,"/hitbase",true)==0)
    {
    MoveObject(tGate,1411.0688476563, -1891.7446289063, 12.772193908691,2.0);
    SetTimer("GateClosetGate",5000,0);
    }
    return 1;

    Why do programmers always mix up Halloween and Christmas?
    Oct 31 == Dec 25

  • new tGate;
    forward GateCloseGate();
    if(strcmp(cmdtext,"/hitbase",true)==0)
    {
    MoveObject(tGate,1411.0688476563, -1891.7446289063, 12.772193908691,2.0);
    SetTimer("GateClosetGate",5000,0);
    }
    return 1;



    public GateCloseGate()
    {
    MoveObject(tGate, Ursprungskoordinaten,2.0);
    return 1;
    }


    Achja und bei den Objekten noch dein Tor:

    tGate = CreateObject(.....);

  • Ok hier is


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    dcmd(wtime,5,cmdtext);
    dcmd(car,3,cmdtext);
    dcmd(opfer,5,cmdtext);
    dcmd(auftrag,7,cmdtext);
    dcmd(resetskin,9,cmdtext);
    dcmd(gate,4,cmdtext);
    dcmd(member,6,cmdtext);
    dcmd(leave,5,cmdtext);
    dcmd(take,4,cmdtext);
    dcmd(lizenzen,8,cmdtext);
    dcmd(showlizenz,10,cmdtext);
    dcmd(lizenz,6,cmdtext);
    dcmd(start,5,cmdtext);
    dcmd(stop,4,cmdtext);
    dcmd(ann,3,cmdtext);
    dcmd(clearwanted,11,cmdtext);
    dcmd(sms,3,cmdtext);
    dcmd(s,1,cmdtext);
    dcmd(makesupport,11,cmdtext);
    dcmd(cancel,6,cmdtext);
    dcmd(accept,6,cmdtext);
    dcmd(ticket,6,cmdtext);
    dcmd(pinfo,5,cmdtext);
    dcmd(buylevel,8,cmdtext);
    dcmd(duty,4,cmdtext);
    dcmd(frisk,5,cmdtext);
    dcmd(wanteds,7,cmdtext);
    dcmd(cuff,4,cmdtext);
    dcmd(suspect,7,cmdtext);
    dcmd(arrest,6,cmdtext);
    dcmd(megafon,7,cmdtext);
    dcmd(f,1,cmdtext);
    dcmd(rnachricht,10,cmdtext);
    dcmd(tazer,5,cmdtext);
    dcmd(sperre,6,cmdtext);
    dcmd(enter,5,cmdtext);
    dcmd(exit,4,cmdtext);
    dcmd(q,1,cmdtext);
    dcmd(leaderhelp,10,cmdtext);
    dcmd(adminhelp,9,cmdtext);
    dcmd(admins,6,cmdtext);
    dcmd(clear,5,cmdtext);
    dcmd(veh,3,cmdtext);
    dcmd(vehid,5,cmdtext);
    dcmd(lehrer,6,cmdtext);
    dcmd(stats,5,cmdtext);
    dcmd(bsn,3,cmdtext);
    dcmd(help,4,cmdtext);
    dcmd(atmhelp,7,cmdtext);
    dcmd(atmdeposit,10,cmdtext);
    dcmd(atmwithdraw,11,cmdtext);
    dcmd(atmtransfer,11,cmdtext);
    dcmd(makeleader,10,cmdtext);
    dcmd(heal,4,cmdtext);
    dcmd(ban,3,cmdtext);
    dcmd(kick,4,cmdtext);
    dcmd(o,1,cmdtext);
    dcmd(makeadmin,9,cmdtext);
    dcmd(goto,4,cmdtext);
    dcmd(teletome,8,cmdtext);
    dcmd(pstat,5,cmdtext);
    dcmd(slap,4,cmdtext);
    dcmd(freeze,6,cmdtext);
    dcmd(mute,4,cmdtext);
    dcmd(geldlos,7,cmdtext);
    dcmd(delveh,6,cmdtext);
    dcmd(report,6,cmdtext);
    dcmd(a,1,cmdtext);
    dcmd(ad,2,cmdtext);
    dcmd(banip,5,cmdtext);
    dcmd(unbanip,7,cmdtext);
    dcmd(kickall,7,cmdtext);
    dcmd(healall,7,cmdtext);
    dcmd(deposit,7,cmdtext);
    dcmd(withdraw,8,cmdtext);
    dcmd(transfer,8,cmdtext);
    dcmd(giverank,8,cmdtext);
    dcmd(register,8,cmdtext);
    dcmd(login,5,cmdtext);
    SendClientMessage(playerid, COLOR_RED, "*::* Unbekannter Befehl *::*");
    return 1;


    }
    if(strcmp(cmdtext,"/hitbase",true)==0)
    {
    MoveObject(tGate,1411.0688476563, -1891.7446289063, 12.772193908691,2.0);
    SetTimer("GateClosetGate",5000,0);
    }
    return 1;


    public IstPolizist(playerid)
    {
    new member = PlayerInfo[playerid][pMember];
    new leader = PlayerInfo[playerid][pLeader];
    if(member == 2 || leader == 2) { return 1; }
    return 0;
    }
    public IstFBI(playerid)
    {
    new member = PlayerInfo[playerid][pMember];
    new leader = PlayerInfo[playerid][pLeader];
    if(member == 3 || leader == 3) { return 1; }
    return 0;
    }
    public IstSani(playerid)
    {
    new member = PlayerInfo[playerid][pMember];
    new leader = PlayerInfo[playerid][pLeader];
    if(member == 4 || leader == 4) { return 1; }
    return 0;
    }
    public IstLehrer(playerid)
    {
    new member = PlayerInfo[playerid][pMember];
    new leader = PlayerInfo[playerid][pLeader];
    if(member == 5 || leader == 5) { return 1; }
    return 0;
    }
    public IstHitman(playerid)
    {
    new member = PlayerInfo[playerid][pMember];
    new leader = PlayerInfo[playerid][pLeader];
    if(member == 6 || leader == 6) { return 1; }
    GivePlayerWeapon(playerid, 24, 100);
    GivePlayerWeapon(playerid, 31, 100);
    GivePlayerWeapon(playerid, 29, 100);
    return 0;

  • if(strcmp(cmdtext,"/hitbase",true)==0)//hier kp sry ich benutz nur dcmd ^^
    {
    MoveObject(tGate,1411.0688476563, -1891.7446289063, 12.772193908691,2.0);
    SetTimer("GateClosetGate",5000,0);
    return 1;
    }
    so isses doch richtig(dachte ich) 8| ist das so schwer ??


    //EDIT so wie ich das sehe haste sowieso dcmd da mach ich dir das mal so:
    oben zu den anderen:
    dcmd(hitbase,7,cmdtext);
    und da wo das alte steht das rein:
    dcmd_hitbase(playerid,params[])
    {
    #pragma unused params
    MoveObject(tGate,1411.0688476563, -1891.7446289063, 12.772193908691,2.0);
    SetTimer("GateClosetGate",5000,0);
    return 1;
    }

    2 Mal editiert, zuletzt von bad_company ()

  • Ersetzt das mit dem was davor war =D
    public OnPlayerCommandText(playerid, cmdtext[])
    {
    dcmd(wtime,5,cmdtext);
    dcmd(car,3,cmdtext);
    dcmd(opfer,5,cmdtext);
    dcmd(auftrag,7,cmdtext);
    dcmd(resetskin,9,cmdtext);
    dcmd(gate,4,cmdtext);
    dcmd(member,6,cmdtext);
    dcmd(leave,5,cmdtext);
    dcmd(take,4,cmdtext);
    dcmd(lizenzen,8,cmdtext);
    dcmd(showlizenz,10,cmdtext);
    dcmd(lizenz,6,cmdtext);
    dcmd(start,5,cmdtext);
    dcmd(stop,4,cmdtext);
    dcmd(ann,3,cmdtext);
    dcmd(clearwanted,11,cmdtext);
    dcmd(sms,3,cmdtext);
    dcmd(s,1,cmdtext);
    dcmd(makesupport,11,cmdtext);
    dcmd(cancel,6,cmdtext);
    dcmd(accept,6,cmdtext);
    dcmd(ticket,6,cmdtext);
    dcmd(pinfo,5,cmdtext);
    dcmd(buylevel,8,cmdtext);
    dcmd(duty,4,cmdtext);
    dcmd(frisk,5,cmdtext);
    dcmd(wanteds,7,cmdtext);
    dcmd(cuff,4,cmdtext);
    dcmd(suspect,7,cmdtext);
    dcmd(arrest,6,cmdtext);
    dcmd(megafon,7,cmdtext);
    dcmd(f,1,cmdtext);
    dcmd(rnachricht,10,cmdtext);
    dcmd(tazer,5,cmdtext);
    dcmd(sperre,6,cmdtext);
    dcmd(enter,5,cmdtext);
    dcmd(exit,4,cmdtext);
    dcmd(q,1,cmdtext);
    dcmd(leaderhelp,10,cmdtext);
    dcmd(adminhelp,9,cmdtext);
    dcmd(admins,6,cmdtext);
    dcmd(clear,5,cmdtext);
    dcmd(veh,3,cmdtext);
    dcmd(vehid,5,cmdtext);
    dcmd(lehrer,6,cmdtext);
    dcmd(stats,5,cmdtext);
    dcmd(bsn,3,cmdtext);
    dcmd(help,4,cmdtext);
    dcmd(atmhelp,7,cmdtext);
    dcmd(atmdeposit,10,cmdtext);
    dcmd(atmwithdraw,11,cmdtext);
    dcmd(atmtransfer,11,cmdtext);
    dcmd(makeleader,10,cmdtext);
    dcmd(heal,4,cmdtext);
    dcmd(ban,3,cmdtext);
    dcmd(kick,4,cmdtext);
    dcmd(o,1,cmdtext);
    dcmd(makeadmin,9,cmdtext);
    dcmd(goto,4,cmdtext);
    dcmd(teletome,8,cmdtext);
    dcmd(pstat,5,cmdtext);
    dcmd(slap,4,cmdtext);
    dcmd(freeze,6,cmdtext);
    dcmd(mute,4,cmdtext);
    dcmd(geldlos,7,cmdtext);
    dcmd(delveh,6,cmdtext);
    dcmd(report,6,cmdtext);
    dcmd(a,1,cmdtext);
    dcmd(ad,2,cmdtext);
    dcmd(banip,5,cmdtext);
    dcmd(unbanip,7,cmdtext);
    dcmd(kickall,7,cmdtext);
    dcmd(healall,7,cmdtext);
    dcmd(deposit,7,cmdtext);
    dcmd(withdraw,8,cmdtext);
    dcmd(transfer,8,cmdtext);
    dcmd(giverank,8,cmdtext);
    dcmd(register,8,cmdtext);
    dcmd(login,5,cmdtext);
    //SendClientMessage(playerid, COLOR_RED, "*::* Unbekannter Befehl *::*");
    if(strcmp(cmdtext,"/hitbase",true)==0)
    {
    MoveObject(tGate,1411.0688476563, -1891.7446289063, 12.772193908691,2.0);
    SetTimer("GateClosetGate",5000,0);
    return 1;
    }
    return 1;
    }

    Why do programmers always mix up Halloween and Christmas?
    Oct 31 == Dec 25

  • Achja tipp mach das:
    [...]
    dcmd(giverank,8,cmdtext);
    dcmd(register,8,cmdtext);
    dcmd(login,5,cmdtext);
    SendClientMessage(playerid, COLOR_RED, "*::* Unbekannter Befehl *::*");
    return 1;
    }

    zu:
    [...]
    dcmd(giverank,8,cmdtext);
    dcmd(register,8,cmdtext);
    dcmd(login,5,cmdtext);
    return SendClientMessage(playerid, COLOR_RED, "*::* Unbekannter Befehl *::*");
    }

    Sonst schreibt es doch immer bei jedem befehl auch wenn er richtig ist "*::* Unbekannter Befehl *::*"

  • Nope. So schreibt es bei jedem Befehl das es falsch ist =P
    Deswegen so lassen sonst ist es Epic ;)

    Why do programmers always mix up Halloween and Christmas?
    Oct 31 == Dec 25