Falsche defines?

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
  • #define StatusVP() (!VP )?("AUS":"AN"))
    #define StatusPJP() (!PJP )?("AUS":"AN"))
    #define StatusPB() (!PB )?("AUS":"AN"))
    #define StatusZO() (!ZO )?("AUS":"AN"))
    #define StatusRCONZ() (!RCONZ )?("AUS":"AN"))
    #define StatusZR() (!ZR )?("AUS":"AN"))
    #define StatusDBP() (!DBP )?("AUS":"AN"))
    #define StatusBHP() (!BHP )?("AUS":"AN"))
    #define StatusMPing() (!MPing )?("AUS":"AN"))
    #define StatusFloat:MBrzina() (!Float:MBrzina )?("AUS":"AN"))
    #define StatusPAB() (!PAB )?("AUS":"AN"))
    #define StatusNN() (!NN )?("AUS":"AN"))
    #define StatusNH() (!NH )?("AUS":"AN"))
    #define StatusNA() (!NA )?("AUS":"AN"))
    #define StatusNT() (!NT )?("AUS":"AN"))
    #define StatusFT() (!FT )?("AUS":"AN"))
    #define StatusANT() (!ANT )?("AUS":"AN"))
    #define StatusANT2() (!ANT2 )?("AUS":"AN"))
    #define StatusAVR() (!AVR )?("AUS":"AN"))
    #define StatusAS() (!AS )?("AUS":"AN"))
    #define StatusAAFK() (!AAFK )?("AUS":"AN"))



    Und wenn ich dann die Dialog damit vervollständige also so:
    format(string1,450,"1. Turn ON/OFF: Too High Ping [%s]\n2. Turn ON/OFF: Anti JetPack-a [%s]\n3. Turn ON/OFF: Anti Speed Hack [%s]\n4. Turn ON/OFF: Bad Weapons [%s]\n5. Turn ON/OFF: Anti RCON Hack [%s]\n6. Turn ON/OFF: Anti Swear [%s]\n7. Turn ON/OFF: Anti Drive By [%s]\n8. Turn ON/OFF: Anti Bunny Hop [%s]\n9. Turn ON/OFF: Anti AirBrake [%s]\n10. Turn ON/OFF: Anti Money Hack [%s]",StatusVP(),StatusPJP().................);


    Doch wenn ich das so mache kommen sämtlich Errors und Pawno stürzt ab.

  • CMD:anticheat(playerid, params[])
    {
    if(!IsPlayerAdmin(playerid))
    {
    SendClientMessage(playerid, BELA, "Du musst im RCON eingeloggt sein!");
    return 1;
    }
    new string[900],string1[450];
    format(string1,450,"1. Turn ON/OFF: Too High Ping [%s]\n2. Turn ON/OFF: Anti JetPack-a [%s]\n3. Turn ON/OFF: Anti Speed Hack [%s]\n4. Turn ON/OFF: Bad Weapons [%s]\n5. Turn ON/OFF: Anti RCON Hack [%s]\n6. Turn ON/OFF: Anti Swear [%s]\n7. Turn ON/OFF: Anti Drive By [%s]\n8. Turn ON/OFF: Anti Bunny Hop [%s]\n9. Turn ON/OFF: Anti AirBrake [%s]\n10. Turn ON/OFF: Anti Money Hack [%s]",StatusVP(),StatusPJP(),StatusPB(),StatusZO(),StatusRCONZ());
    format(string2,450,"\n11. Turn ON/OFF: Anti Health Hack [%s]\n12. Turn ON/OFF: Anti Armour Hack [%s]\n13. Turn ON/OFF: Anti Interior Hack [%s]\n14. Turn ON/OFF: Anti Fly Hack [%s]\n15. Turn ON/OFF: Anti Teleport[1] [%s]\n16. Turn ON/OFF: Anti Teleport[2] [%s]\n17. Turn ON/OFF: Anti Vehicle Repair [%s]\n18. Turn ON/OFF: Anti Spam [%s]\n19. Turn ON/OFF: Anti AFK [%s]",StatusNH(),StatusNA(),StatusFP(),StatusANT(),StatusANT2());
    format(string, sizeof(string),"%s %s",string1,string2);
    ShowPlayerDialog(playerid, 19999, DIALOG_STYLE_LIST, "[Setting AntiCheat]",string, "Ok", "Cancle");
    return 1;
    }


    Das Problem ist wenn ich mehr als 5 Variablen definere im format dann stürzt der Compiler ab warum?

  • Ok so kommen keine Errors:
    CMD:anticheat(playerid, params[])
    {
    if(!IsPlayerAdmin(playerid))
    {
    SendClientMessage(playerid, BELA, "Du musst im RCON eingeloggt sein!");
    return 1;
    }
    new string[1600],string1[400],string2[400],string3[400],string4[400];
    format(string1,400,"1. Turn ON/OFF: Too High Ping [%s]\n2. Turn ON/OFF: Anti JetPack-a [%s]\n3. Turn ON/OFF: Anti Speed Hack [%s]\n4. Turn ON/OFF: Bad Weapons [%s]\n5. Turn ON/OFF: Anti RCON Hack [%s]\n",StatusVP(),StatusPJP(),StatusPB(),StatusZO(),StatusRCONZ());
    format(string2,400,"6. Turn ON/OFF: Anti Swear [%s]\n7. Turn ON/OFF: Anti Drive By [%s]\n8. Turn ON/OFF: Anti Bunny Hop [%s]\n9. Turn ON/OFF: Anti AirBrake [%s]\n10. Turn ON/OFF: Anti Money Hack [%s]",StatusZR(),StatusDBP(),StatusBHP(),StatusPAB(),StatusNN());
    format(string3,400,"\n11. Turn ON/OFF: Anti Health Hack [%s]\n12. Turn ON/OFF: Anti Armour Hack [%s]\n13. Turn ON/OFF: Anti Interior Hack [%s]\n14. Turn ON/OFF: Anti Fly Hack [%s]\n15. Turn ON/OFF: Anti Teleport[1] [%s]\n16. Turn ON/OFF: Anti Teleport[2] [%s]\n",StatusNH(),StatusNA(),StatusNT(),StatusFP(),StatusANT());
    format(string4,400,"16. Turn ON/OFF: Anti Teleport[2] [%s]\n17. Turn ON/OFF: Anti Vehicle Repair [%s]\n18. Turn ON/OFF: Anti Spam [%s]\n19. Turn ON/OFF: Anti AFK [%s]",StatusANT2(),StatusAVR(),StatusAS(),StatusAAFK());
    format(string, sizeof(string),"%s %s",string1,string2,string3,string4);
    ShowPlayerDialog(playerid, 19999, DIALOG_STYLE_LIST, "[Setting AntiCheat]",string, "Ok", "Cancle");
    return 1;
    }


    Aber es werden auch nur 2 String angezeigt.

  • Warum so umständlich?
    CMD:anticheat(playerid, params[])
    {
    if(!IsPlayerAdmin(playerid))
    {
    SendClientMessage(playerid, BELA, "Du musst im RCON eingeloggt sein!");
    return 1;
    }
    new string[1600];
    format(string,sizeof(string),"1. Turn ON/OFF: Too High Ping [%s]\n2. Turn ON/OFF: Anti JetPack-a [%s]\n3. Turn ON/OFF: Anti Speed Hack [%s]\n4. Turn ON/OFF: Bad Weapons [%s]\n5. Turn ON/OFF: Anti RCON Hack [%s]\n",StatusVP(),StatusPJP(),StatusPB(),StatusZO(),StatusRCONZ());
    format(string,sizeof(string),"%s6. Turn ON/OFF: Anti Swear [%s]\n7. Turn ON/OFF: Anti Drive By [%s]\n8. Turn ON/OFF: Anti Bunny Hop [%s]\n9. Turn ON/OFF: Anti AirBrake [%s]\n10. Turn ON/OFF: Anti Money Hack [%s]",string,StatusZR(),StatusDBP(),StatusBHP(),StatusPAB(),StatusNN());
    format(string,sizeof(string),"%s\n11. Turn ON/OFF: Anti Health Hack [%s]\n12. Turn ON/OFF: Anti Armour Hack [%s]\n13. Turn ON/OFF: Anti Interior Hack [%s]\n14. Turn ON/OFF: Anti Fly Hack [%s]\n15. Turn ON/OFF: Anti Teleport[1] [%s]\n16. Turn ON/OFF: Anti Teleport[2] [%s]\n",string,StatusNH(),StatusNA(),StatusNT(),StatusFP(),StatusANT());
    format(string,sizeof(string),"%s16. Turn ON/OFF: Anti Teleport[2] [%s]\n17. Turn ON/OFF: Anti Vehicle Repair [%s]\n18. Turn ON/OFF: Anti Spam [%s]\n19. Turn ON/OFF: Anti AFK [%s]",string,StatusANT2(),StatusAVR(),StatusAS(),StatusAAFK());
    ShowPlayerDialog(playerid, 19999, DIALOG_STYLE_LIST, "[Setting AntiCheat]",string, "Ok", "Cancle");
    return 1;
    }
    ;)