Unbekannter Error?

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
  • hi ich habe gerade gemacht das man zufall spawnt also wenn man dann /dm1-4 eingibt aber habe F5 gedrückt kommen die error die ich net verstehe


    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(454) : error 032: array index out of bounds (variable "posdm2")
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(466) : error 032: array index out of bounds (variable "posdm3")
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(480) : error 032: array index out of bounds (variable "posdm1")
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(504) : error 032: array index out of bounds (variable "posdm4")
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.


    und hier die zeigen die ich habe (befehle)


    Spoiler anzeigen
    if(strcmp("/dm2", cmdtext, true) == 0)
    {
    new a=random(sizeof(posdm2));
    SetPlayerPos(playerid,posdm2[a][0],posdm2[a][1],posdm2[a][2],posdm2[a][3],posdm2[a][4],posdm2[a][5],posdm2[a][6],posdm2[a][7],posdm2[a][8],posdm2[a][9],posdm2[a][10]);
    SetPlayerInterior(playerid , 10);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,38,500000);
    GivePlayerWeapon(playerid,34,500000);
    SendClientMessage(playerid, 0x3DD926FF, "Erfolgreich Teleportiert!!!");
    return 1;
    }

    Spoiler anzeigen
    if(strcmp("/dm3", cmdtext, true) == 0)
    {
    new a=random(sizeof(posdm3));
    SetPlayerPos(playerid,posdm3[a][0],posdm3[a][1],posdm3[a][2],posdm3[a][3],posdm3[a][4],posdm3[a][5],posdm3[a][6],posdm3[a][7],posdm3[a][8],posdm3[a][9]);
    SetPlayerInterior(playerid , 1);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,32,500000);
    GivePlayerWeapon(playerid,31,500000);
    GivePlayerWeapon(playerid,25,500000);
    GivePlayerWeapon(playerid,23,500000);
    SendClientMessage(playerid, 0x3DD926FF, "Erfolgreich Teleportiert!!!");
    return 1;
    }

    Spoiler anzeigen
    if(strcmp("/dm1", cmdtext, true) == 0)
    {
    new a=random(sizeof(posdm1));
    SetPlayerPos(playerid,posdm1[a][0],posdm1[a][1],posdm1[a][2],posdm1[a][3],posdm1[a][4]);
    SetPlayerInterior(playerid , 1);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,29,500000);
    GivePlayerWeapon(playerid,26,500000);
    GivePlayerWeapon(playerid,24,500000);
    GivePlayerWeapon(playerid,4,1);
    SendClientMessage(playerid, 0x3DD926FF, "Erfolgreich Teleportiert!!!");
    return 1;
    }

    Spoiler anzeigen
    if(strcmp("/dm4", cmdtext, true) == 0)
    {
    new a=random(sizeof(posdm4));
    SetPlayerPos(playerid,posdm4[a][0],posdm4[a][1],posdm4[a][2],posdm4[a][3],posdm4[a][4],posdm4[a][5],posdm4[a][6],posdm4[a][7],posdm4[a][8],posdm4[a][9],posdm4[a][10],posdm4[a][11],posdm4[a][12],posdm4[a][13],posdm4[a][14],posdm4[a][15],posdm4[a][16],posdm4[a][17],posdm4[a][18],posdm4[a][19],posdm4[a][20],posdm4[a][21],posdm4[a][22],posdm4[a][23]);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,23,50000);
    GivePlayerWeapon(playerid,25,50000);
    GivePlayerWeapon(playerid,29,50000);
    GivePlayerWeapon(playerid,31,50000);
    GivePlayerWeapon(playerid,34,50000);
    SendClientMessage(playerid, 0x3DD926FF, "Erfolgreich Teleportiert!!!");
    return 1;
    }


    Bitte Bitte Bitte Bitte helft mir


    MFG: GStyler

  • hier alles was ich gemacht habe


    hier die Kords.

    Spoiler anzeigen
    new Float:posdm1[][]={
    {-2158.9341,641.4609,1052.3817},
    {-2165.5210,646.0139,1052.3750},
    {-2170.9622,635.7086,1052.3750},
    {-2170.1868,645.5738,1057.5938},
    {-2160.3953,639.1025,1057.5861}
    };
    new Float:posdm2[][]={
    {-975.9926,1061.0554,1345.6719},
    {-974.4055,1024.0031,1345.0432},
    {-975.4568,1089.5901,1344.9716},
    {-1030.0225,1077.8467,1343.1989},
    {-1024.0276,1047.4796,1342.2537},
    {-1066.1628,1023.3312,1343.1466},
    {-1077.8474,1088.7698,1342.6838},
    {-1092.8682,1045.4083,1343.5305},
    {-1130.5706,1057.8187,1346.4141},
    {-1131.4185,1029.0956,1345.7294},
    {-1130.7598,1093.9290,1345.7830}
    };
    new Float:posdm3[][]={
    {2169.4612,1618.7983,999.9766},
    {2171.1560,1591.7212,999.9733},
    {2190.1682,1592.6560,999.9734},
    {2196.6716,1579.8977,999.9771},
    {2205.3674,1580.0219,999.9775},
    {2205.2395,1552.5194,1008.4072},
    {2229.2490,1573.6816,999.9681},
    {2231.1470,1596.0137,999.9619},
    {2218.3159,1613.9316,999.9827},
    {2206.4531,1610.4258,999.9738}
    };
    new Float:posdm4[][]={
    {2336.2854,-1799.7251,970.0292},
    {2383.7700,-1853.4600,974.0604},
    {2387.3020,-1849.8915,974.0604},
    {2339.1445,-1857.5582,992.6282},
    {2350.6995,-1846.2155,992.6282},
    {2276.5730,-1740.7306,973.3450},
    {2251.0908,-1741.6057,978.0869},
    {2256.5178,-1720.0200,983.0817},
    {2247.3325,-1680.7960,993.0419},
    {2364.3250,-1729.2645,984.8797},
    {2384.1904,-1728.3213,984.8797},
    {2387.4099,-1729.3801,984.8797},
    {2408.2695,-1667.6517,970.0292},
    {2438.8284,-1694.2046,986.1658},
    {2425.5745,-1705.1782,987.2362},
    {2367.2100,-1829.8754,992.9302},
    {2339.4668,-1842.9880,1002.7100},
    {2337.3564,-1841.2864,1007.1385},
    {2323.3704,-1844.7645,1009.5038},
    {2326.3638,-1813.8795,993.7781},
    {2314.2588,-1819.9054,997.4941},
    {2323.7771,-1817.4233,979.0707},
    {2331.5552,-1778.0117,979.0707},
    {2275.9937,-1792.6960,973.3613}
    };


    und hier die Befehle

    Spoiler anzeigen
    if(strcmp("/dm2", cmdtext, true) == 0)
    {
    new a = random(sizeof posdm2);
    SetPlayerPos(playerid,posdm2[a][0],posdm2[a][1],posdm2[a][2],posdm2[a][3],posdm2[a][4],posdm2[a][5],posdm2[a][6],posdm2[a][7],posdm2[a][8],posdm2[a][9],posdm2[a][10]);
    SetPlayerInterior(playerid , 10);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,38,500000);
    GivePlayerWeapon(playerid,34,500000);
    GameTextForAll("%s ist Deathmatch 2 Beigetreten ( /dm2 )" , 50, 1);
    return 1;
    }

    Spoiler anzeigen
    if(strcmp("/dm3", cmdtext, true) == 0)
    {
    new a = random(sizeof posdm3);
    SetPlayerPos(playerid,posdm3[a][0],posdm3[a][1],posdm3[a][2],posdm3[a][3],posdm3[a][4],posdm3[a][5],posdm3[a][6],posdm3[a][7],posdm3[a][8],posdm3[a][9]);
    SetPlayerInterior(playerid , 1);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,32,500000);
    GivePlayerWeapon(playerid,31,500000);
    GivePlayerWeapon(playerid,25,500000);
    GivePlayerWeapon(playerid,23,500000);
    GameTextForAll("%s ist Deathmatch 3 Beigetreten ( /dm3 )" , 50, 1);
    return 1;
    }

    Spoiler anzeigen
    if(strcmp("/dm1", cmdtext, true) == 0)
    {
    new a = random(sizeof posdm1);
    SetPlayerPos(playerid,posdm1[a][0],posdm1[a][1],posdm1[a][2],posdm1[a][3],posdm1[a][4]);
    SetPlayerInterior(playerid , 1);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,29,500000);
    GivePlayerWeapon(playerid,26,500000);
    GivePlayerWeapon(playerid,24,500000);
    GivePlayerWeapon(playerid,4,1);
    GameTextForAll("%s ist Deathmatch 1 Beigetreten ( /dm1 )" , 50, 1);
    return 1;
    }

    Spoiler anzeigen
    if(strcmp("/dm4", cmdtext, true) == 0)
    {
    new a = random(sizeof posdm4);
    SetPlayerPos(playerid,posdm4[a][0],posdm4[a][1],posdm4[a][2],posdm4[a][3],posdm4[a][4],posdm4[a][5],posdm4[a][6],posdm4[a][7],posdm4[a][8],posdm4[a][9],posdm4[a][10],posdm4[a][11],posdm4[a][12],posdm4[a][13],posdm4[a][14],posdm4[a][15],posdm4[a][16],posdm4[a][17],posdm4[a][18],posdm4[a][19],posdm4[a][20],posdm4[a][21],posdm4[a][22],posdm4[a][23]);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,23,50000);
    GivePlayerWeapon(playerid,25,50000);
    GivePlayerWeapon(playerid,29,50000);
    GivePlayerWeapon(playerid,31,50000);
    GivePlayerWeapon(playerid,34,50000);
    GameTextForAll("%s ist Deathmatch 4 Beigetreten ( /dm4 )" , 50, 1);
    return 1;
    }


    und hier nochmal die Error´s

    Spoiler anzeigen
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(454) : error 032: array index out of bounds (variable "posdm2")
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(466) : error 032: array index out of bounds (variable "posdm3")
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(480) : error 032: array index out of bounds (variable "posdm1")
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(504) : error 032: array index out of bounds (variable "posdm4")
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

    Spoiler anzeigen
    4 Errors.

  • ich könnte mich teuschen aber muss her nich ne angabe rein ?


    Also dan so


    new Float:posdm2[3][10]={ // Die 3 Wegen X,Y,Z, und die 10 weill es 11 sind aber ein Array bei 0 anfängt ??!
    {-975.9926,1061.0554,1345.6719},
    {-974.4055,1024.0031,1345.0432},
    {-975.4568,1089.5901,1344.9716},
    {-1030.0225,1077.8467,1343.1989},
    {-1024.0276,1047.4796,1342.2537},
    {-1066.1628,1023.3312,1343.1466},
    {-1077.8474,1088.7698,1342.6838},
    {-1092.8682,1045.4083,1343.5305},
    {-1130.5706,1057.8187,1346.4141},
    {-1131.4185,1029.0956,1345.7294},
    {-1130.7598,1093.9290,1345.7830}
    };

  • Da hat Philipp aber recht mit Zahlen, weil dieser Arrey fehler kommt, wenn du bsp falsch gezählt hast und so.
    Bsp: du has ne Arrey aufzählung und fängst mit 1 an, würde des auch kommen, aber merk dir aufjedenfall,
    bei Arrey aufzählungen immer mit 0 anfangen...
    Mfg

  • habe es versucht



    hier das wie philipp gesagt hat

    Spoiler anzeigen
    new Float:posdm1[4][3]={
    {-2158.9341,641.4609,1052.3817},
    {-2165.5210,646.0139,1052.3750},
    {-2170.9622,635.7086,1052.3750},
    {-2170.1868,645.5738,1057.5938},
    {-2160.3953,639.1025,1057.5861}
    };
    new Float:posdm2[10][3]={
    {-975.9926,1061.0554,1345.6719},
    {-974.4055,1024.0031,1345.0432},
    {-975.4568,1089.5901,1344.9716},
    {-1030.0225,1077.8467,1343.1989},
    {-1024.0276,1047.4796,1342.2537},
    {-1066.1628,1023.3312,1343.1466},
    {-1077.8474,1088.7698,1342.6838},
    {-1092.8682,1045.4083,1343.5305},
    {-1130.5706,1057.8187,1346.4141},
    {-1131.4185,1029.0956,1345.7294},
    {-1130.7598,1093.9290,1345.7830}
    };
    new Float:posdm3[9][3]={
    {2169.4612,1618.7983,999.9766},
    {2171.1560,1591.7212,999.9733},
    {2190.1682,1592.6560,999.9734},
    {2196.6716,1579.8977,999.9771},
    {2205.3674,1580.0219,999.9775},
    {2205.2395,1552.5194,1008.4072},
    {2229.2490,1573.6816,999.9681},
    {2231.1470,1596.0137,999.9619},
    {2218.3159,1613.9316,999.9827},
    {2206.4531,1610.4258,999.9738}
    };
    new Float:posdm4[23][3]={
    {2336.2854,-1799.7251,970.0292},
    {2383.7700,-1853.4600,974.0604},
    {2387.3020,-1849.8915,974.0604},
    {2339.1445,-1857.5582,992.6282},
    {2350.6995,-1846.2155,992.6282},
    {2276.5730,-1740.7306,973.3450},
    {2251.0908,-1741.6057,978.0869},
    {2256.5178,-1720.0200,983.0817},
    {2247.3325,-1680.7960,993.0419},
    {2364.3250,-1729.2645,984.8797},
    {2384.1904,-1728.3213,984.8797},
    {2387.4099,-1729.3801,984.8797},
    {2408.2695,-1667.6517,970.0292},
    {2438.8284,-1694.2046,986.1658},
    {2425.5745,-1705.1782,987.2362},
    {2367.2100,-1829.8754,992.9302},
    {2339.4668,-1842.9880,1002.7100},
    {2337.3564,-1841.2864,1007.1385},
    {2323.3704,-1844.7645,1009.5038},
    {2326.3638,-1813.8795,993.7781},
    {2314.2588,-1819.9054,997.4941},
    {2323.7771,-1817.4233,979.0707},
    {2331.5552,-1778.0117,979.0707},
    {2275.9937,-1792.6960,973.3613}
    };

    Error´s
    Spoiler anzeigen
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(213) : error 018: initialization data exceeds declared size
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(215) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(226) : error 018: initialization data exceeds declared size
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(228) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(238) : error 018: initialization data exceeds declared size
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(240) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(264) : error 018: initialization data exceeds declared size
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(266) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(454) : error 032: array index out of bounds (variable "posdm2")
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(466) : error 032: array index out of bounds (variable "posdm3")
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(480) : error 032: array index out of bounds (variable "posdm1")
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(504) : error 032: array index out of bounds (variable "posdm4")
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

    Spoiler anzeigen
    12 Errors.

  • Spoiler anzeigen
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(213) : error 018: initialization data exceeds declared size
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(215) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(226) : error 018: initialization data exceeds declared size
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(228) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(238) : error 018: initialization data exceeds declared size
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(240) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(264) : error 018: initialization data exceeds declared size
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(266) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(454) : error 032: array index out of bounds (variable "posdm2")
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(466) : error 032: array index out of bounds (variable "posdm3")
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(480) : error 032: array index out of bounds (variable "posdm1")
    C:\Dokumente und Einstellungen\Bauer\Desktop\Artur\GTA\Server\gamemodes\Elite-Stunter.pwn(504) : error 032: array index out of bounds (variable "posdm4")
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

    Spoiler anzeigen
    12 Errors.

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