[Tutorial] Zollsystem [Anfänger]

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
  • Anfang:
    enum zollsys {
    zID,
    zObject,
    Float:zCX,
    Float:zCY,
    Float:zCZ,
    Float:zCRx,
    Float:zCRy,
    Float:zCRz,
    Float:zOX,
    Float:zOY,
    Float:zOZ,
    Float:zORx,
    Float:zORy,
    Float:zORz,
    bool:zState,
    };
    #define MAX_ZOLLGATES (19)


    new ZollInfo[MAX_ZOLLGATES][zollsys] = {
    {0,973,1754.4000244,525.9000244,27.2999992-3,0.0000000,0.0000000,160.0000000,1754.4000244,525.9000244,27.2999992,0.0000000,0.0000000,160.0000000,false},
    {1,973,1745.9000244,528.9000244,27.2999992-3,0.0000000,0.0000000,160.0000000,1745.9000244,528.9000244,27.2999992,0.0000000,0.0000000,160.0000000,false},
    {2,973,1737.5999756,532.2999878,27.2999992-3,0.0000000,0.0000000,340.0000000,1737.5999756,532.2999878,27.2999992,0.0000000,0.0000000,340.0000000,false},
    {3,973,1729.4000244,535.4000244,27.2999992-3,0.0000000,0.0000000,340.0000000,1729.4000244,535.4000244,27.2999992,0.0000000,0.0000000,340.0000000,false},
    {4,979,433.3999939,597.4000244,18.7999992-3,0.0000000,0.0000000,34.0000000,433.3999939,597.4000244,18.7999992,0.0000000,0.0000000,34.0000000,false},
    {5,979,-139.5000000,473.2000122,11.8999996-3,0.0000000,0.0000000,346.0000000,-139.5000000,473.2000122,11.8999996,0.0000000,0.0000000,346.0000000,false},
    {6,978,-1303.8994141,934.0000000,45.7000008-3,0.0000000,0.0000000,315.9997559,-1303.8994141,934.0000000,45.7000008,0.0000000,0.0000000,315.9997559,false},
    {7,978,-1309.5999756,939.5000000,45.5999985-3,0.0000000,0.0000000,316.0000000,-1309.5999756,939.5000000,45.5999985,0.0000000,0.0000000,316.0000000,false},
    {8,978,-1297.5000000,927.2000122,45.7000008-3,0.0000000,0.0000000,136.0000000,-1297.5000000,927.2000122,45.7000008,0.0000000,0.0000000,136.0000000,false},
    {9,978,-1291.3000488,921.9000244,45.7000008-3,0.0000000,0.0000000,136.0000000,-1291.3000488,921.9000244,45.7000008,0.0000000,0.0000000,136.0000000,false},
    {10,978,-2686.3999023,1275.8000488,55.2999992-3,0.0000000,0.0000000,0.0000000,-2686.3999023,1275.8000488,55.2999992,0.0000000,0.0000000,0.0000000,false},
    {11,978,-2695.1999512,1275.5999756,55.2999992-3,0.0000000,0.0000000,0.0000000,-2695.1999512,1275.5999756,55.2999992,0.0000000,0.0000000,0.0000000,false},
    {12,978,-2677.0000000,1275.0999756,55.2999992-3,0.0000000,0.0000000,180.0000000,-2677.0000000,1275.0999756,55.2999992,0.0000000,0.0000000,180.0000000,false},
    {13,978,-2667.3000488,1275.0999756,55.2999992-3,0.0000000,0.0000000,180.0000000,-2667.3000488,1275.0999756,55.2999992,0.0000000,0.0000000,180.0000000,false},
    {14,978,-2256.3999023,2681.6000977,55.0000000-3,0.0000000,0.0000000,270.0000000,-2256.3999023,2681.6000977,55.0000000,0.0000000,0.0000000,270.0000000,false},
    {15,978,-2256.8000488,2672.5000000,54.7999992-3,0.0000000,0.0000000,270.0000000,-2256.8000488,2672.5000000,54.7999992,0.0000000,0.0000000,270.0000000,false},
    {16,978,-2254.8000488,2644.5000000,55.2000008-3,0.0000000,0.0000000,90.0000000,-2254.8000488,2644.5000000,55.2000008,0.0000000,0.0000000,90.0000000,false},
    {17,978,-2254.5000000,2635.8999023,55.2000008-3,0.0000000,0.0000000,90.0000000,-2254.5000000,2635.8999023,55.2000008,0.0000000,0.0000000,90.0000000,false}
    };



    OnGamemodeInit:
    for(new i; i < MAX_ZOLLGATES; ++i){
    ZollInfo[i][zID] = CreateDynamicObject(ZollInfo[i][zObject]
    ,ZollInfo[i][zCX]
    ,ZollInfo[i][zCY]
    ,ZollInfo[i][zCZ]
    ,ZollInfo[i][zCRx]
    ,ZollInfo[i[zCRy]
    ,ZollInfo[i][zCRz]
    );
    }



    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(116) : error 008: must be a constant expression; assumed zero
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(134) : error 010: invalid function or declaration
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(222 -- 227) : error 028: invalid subscript (not an array or too many subscripts): "i"
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(227) : warning 217: loose indentation
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(227) : warning 215: expression has no effect
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(227) : error 001: expected token: ";", but found "]"
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(227) : error 029: invalid expression, assumed zero
    C:\Users\Chris\Desktop\0.3x\gamemodes\Script.pwn(227) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    6 Errors.

  • 1. #define MAX_ZOLLGATES (19)
    schau dir die anzahl der tore mal an ich kann keine 19 Zählen bei 18 einträgen 17 +1


    2. Mögen die Arrays keine Operator in ihnen
    27.2999992-3


    zu
    24.2999992


    es ist auch bei der MoveDynamicObject function hinzurechenbar bei Z Koordinate
    und zu guter letzt



    ZollInfo[i][zID] = CreateDynamicObject(ZollInfo[i][zObject]
    ,ZollInfo[i][zCX]
    ,ZollInfo[i][zCY]
    ,ZollInfo[i][zCZ]
    ,ZollInfo[i][zCRx]
    ,ZollInfo[i[zCRy]
    ,ZollInfo[i][zCRz]);


    fällt dir jetzt was auf


    Deswegen habe ich es auch untereinander geschrieben