Error bei Fraktions Skin wo nicht sein dürfte bzw ich den fehler nciht finde ^^

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 ahbe heute im meinem Selfmade für die Fraktionen die Skins gescriptet. Und da kamen 2 Errors die ich nciht erklären kann. Diesmal poste ich den code ^^


    Code:



    //------------------------- FRAKTIONEN ------------------------------
    enum frak
    {
    name[32],
    Float:spawn_x,
    Float:spawn_y,
    Float:spawn_z,
    Float:rotation
    }
    #define MAX_FRAKS 19//Derzeitige Anzahl von Fraktionen
    new fraks[MAX_FRAKS][frak] = {
    {"Zivilist", 0.0, 0.0, 0.0, 0.0}, //Zivilist Platzhalter für FraktionsID 0; nicht löschen!!!)
    {"LSPD", 1525.8121, -1678.0276, 5.8906, 280.0}, //LSPD
    {"SFPD", 219.7618, 110.1031, 1010.2118, 280.0}, //SFPD
    {"Army", 2477.2891, 2387.4006, 16.3959, 280.0}, //FBI
    {"Medic", 0.0, 0.0, 0.0, 0.0}, //Medic
    {"LCN", 691.5536, -1275.8104, 13.5607, 280.0}, //LCN
    {"Yakuza", 691.5536, -1275.8104, 13.5607, 280.0}, //Yakuza
    {"Regierung", 691.5536, -1275.8104, 13.5607, 280.0}, //Regierung
    {"Hitmen", 691.5536, -1275.8104, 13.5607, 280.0}, //Hitmen
    {"San News", 691.5536, -1275.8104, 13.5607, 280.0}, //San News
    {"Taxi", 691.5536, -1275.8104, 13.5607, 280.0}, //Taxi
    {"Fahrschule", 691.5536, -1275.8104, 13.5607, 280.0}, //Fahrschule
    {"Grove Street", 691.5536, -1275.8104, 13.5607, 280.0}, //Grove Street Familie
    {"Ballas", 691.5536, -1275.8104, 13.5607, 280.0}, //Ballas
    {"Scarfo", 691.5536, -1275.8104, 13.5607, 280.0}, //Scarfo
    {"FBI", 691.5536, -1275.8104, 13.5607, 280.0}, //FBI
    {"Terroristen", 691.5536, -1275.8104, 13.5607, 280.0}, //Terroristen
    {"SWAT", 691.5536, -1275.8104, 13.5607, 280.0}, //SWAT
    {"ADAC", 691.5536, -1275.8104, 13.5607, 280.0} //ADAC
    };




    enum leadskin
    {
    lfrak,
    skinid
    }
    new leaderskin[MAX_FRAKS][leadskin] = {
    {0, 23}, //Zivilist
    {1, 283}, //LSPD Leader
    {2, 288}, //SFPD Leader
    {3, 287}, //Army Leader
    {4, 70}, //Medic Leader
    {5, 113}, //LCN Leader
    {6, 49}, //Yakuza Leader
    {7, 295}, //Regierung Leader
    {8, 294}, //Hitmen Leader
    {9, 187}, //San News Leader
    {10, 255}, //Taxi Leader
    {11, 189}, //Fahrschule Leader
    {12, 269}, //Grove Street Leader
    {13, 296}, //Ballas Leader
    {14, 114}, //Scarfo Leader
    {15, 286}, //FBI Leader
    {16, 48}, //Terroristen Leader
    {17, 285}, //SWAT Leader
    {18, 185} //ADAC Leader
    };



    main()
    {


    }


    enum membskin
    {
    lfrak,
    skinid
    }
    new memberskin[MAX_FRAKS][membskin] = {
    {0, 23}, //Zivilist
    {1, 265}, //LSPD Member
    {1, 266}, //LSPD Member
    {1, 267}, //LSPD Member
    {2, 282}, //SFPD Member
    {2, 284}, //SFPD Member
    {3, 287}, //Army Member
    {3, 179}, //Army Member
    {4, 274}, //Medic Member
    {4, 275}, //Medic Member
    {4, 276}, //Medic Member
    {5, 124}, //LCN Member
    {5, 111}, //LCN Member
    {5, 112}, //LCN Member
    {6, 126}, //Yakuza Member
    {6, 186}, //Yakuza Member
    {6, 203}, //Yakuza Member
    {6, 204}, //Yakuza Member
    371 = {7, 17}, //Regierung Member
    {7, 164}, //Regierung Member
    {7, 165}, //Regierung Member
    {8, 294}, //Hitmen Member
    {8, 299}, //Hitmen Member
    {9, 186}, //San News Member
    {10, 7}, //Taxi Member
    {10, 188}, //Taxi Member
    {10, 253}, //Taxi Member
    {11, 11}, //Fahrschule Member
    {11, 172}, //Fahrschule Member
    {11, 171}, //Fahrschule Member
    {12, 269}, //Grove Street Member
    {12, 270}, //Grove Street Member
    {12, 271}, //Grove Street Member
    {13, 102}, //Ballas Member
    {13, 103}, //Ballas Member
    {13, 104}, //Ballas Member
    {14, 115}, //Scarfo Member
    {14, 116}, //Scarfo Member
    {15, 286}, //FBI Member
    {15, 163}, //FBI Member
    {15, 164}, //FBI Member
    {15, 166}, //FBI Member
    {16, 26}, //Terroristen Member
    {16, 33}, //Terroristen Member
    {16, 67}, //Terroristen Member
    {17, 285}, //SWAT Member
    {18, 50}, //ADAC Member
    {18, 42} //ADAC Member
    401 = };


    Fehler Code:


    script3.pwn(371) : error 018: initialization data exceeds declared size
    script3.pwn(401) : error 010: invalid function or declaration



    Die jeweiligen fehler Zeilen wurden gekennzeichnet



    Kann mir jemmand helfen


    -------------------------------------------------------------------------------------
    Kopieren verboten !


  • new memberskin[MAX_FRAKS][membskin] = {
    {0, 23}, //Zivilist
    {1, 265}, //LSPD Member
    {1, 266}, //LSPD Member
    {1, 267}, //LSPD Member
    {2, 282}, //SFPD Member
    {2, 284}, //SFPD Member
    {3, 287}, //Army Member
    {3, 179}, //Army Member
    {4, 274}, //Medic Member
    {4, 275}, //Medic Member
    {4, 276}, //Medic Member
    {5, 124}, //LCN Member
    {5, 111}, //LCN Member
    {5, 112}, //LCN Member
    {6, 126}, //Yakuza Member
    {6, 186}, //Yakuza Member
    {6, 203}, //Yakuza Member
    {6, 204}, //Yakuza Member
    371 = {7, 17}, //Regierung Member // <-------------- Da ist glaub auch der fehler?
    {7, 164}, //Regierung Member
    {7, 165}, //Regierung Member
    {8, 294}, //Hitmen Member
    {8, 299}, //Hitmen Member
    {9, 186}, //San News Member
    {10, 7}, //Taxi Member
    {10, 188}, //Taxi Member
    {10, 253}, //Taxi Member
    {11, 11}, //Fahrschule Member
    {11, 172}, //Fahrschule Member
    {11, 171}, //Fahrschule Member
    {12, 269}, //Grove Street Member
    {12, 270}, //Grove Street Member
    {12, 271}, //Grove Street Member
    {13, 102}, //Ballas Member
    {13, 103}, //Ballas Member
    {13, 104}, //Ballas Member
    {14, 115}, //Scarfo Member
    {14, 116}, //Scarfo Member
    {15, 286}, //FBI Member
    {15, 163}, //FBI Member
    {15, 164}, //FBI Member
    {15, 166}, //FBI Member
    {16, 26}, //Terroristen Member
    {16, 33}, //Terroristen Member
    {16, 67}, //Terroristen Member
    {17, 285}, //SWAT Member
    {18, 50}, //ADAC Member
    {18, 42} //ADAC Member
    401 = }; // Ich glaube da hast du was falsch?


  • Das sagen die Errors auch aber ich weis nciht was udn das ist die Frage: was ist falsch ?

  • 371 = {7, 17} würde eigentlich nicht gehen, da man ja immer {value,value} machen muss
    also wenn 371 der Skin ist dann: [7,371], [7,17}
    Wenn das so in deinem System ist ...
    Und am Ende hast du einfach nur 401 = ... das musst du dann entfernen
    Oder auch ebend eine Fraktion geben {id,401}

  • Dann mach
    new memberskin[MAX_FRAKS][membskin]
    zu:
    new memberskin[][membskin]


    // Edit: Erklärung: Du erstellst die Variable memberskin mit einem index von MAX_FRAKS (19) und kannst in der variable auch nur 19 Einträge vornehmen, wenn du [] benutzt soviele wie du willst und wenn du deine Variable memberskin mal gezählt hast kommt der Fehler nach der 19. Variable (indem fall das von MAX_FRAKS)

  • Dann mach
    new memberskin[MAX_FRAKS][membskin]
    zu:
    new memberskin[][membskin]


    // Edit: Erklärung: Du erstellst die Variable memberskin mit einem index von MAX_FRAKS (19) und kannst in der variable auch nur 19 Einträge vornehmen, wenn du [] benutzt soviele wie du willst und wenn du deine Variable memberskin mal gezählt hast kommt der Fehler nach der 19. Variable (indem fall das von MAX_FRAKS)


    geht es so dann auch noch das ich eine bestimmte frak mach mit bestimmten skin darum ich mach es immer so :
    memberskin[Frakid(z.b. 1)] [skinid]