Hilfe, server abstürze

  • Hilfe, server abstürze

    immer wenn einer Joint kommt das
    [pwn][13:48:28] [debug] Run time error 4: "Array index out of bounds"
    [13:48:28] [debug] Accessing element at index 65535 past array upper bound 1999
    [13:48:28] [debug] AMX backtrace:
    [13:48:28] [debug] #0 0009e8b0 in public Itter_OnPlayerConnect () from SelfMade.amx
    [13:48:28] [debug] #1 00006c64 in public Streamer_OnPlayerConnect () from SelfMade.amx
    [13:48:28] [debug] #2 00006130 in public OnPlayerConnect () from SelfMade.amx[/pwn]

    und nach etwa 1-2 stunen das da dan kakt er ab
    [pwn]13:01:21] [debug] Run time error 4: "Array index out of bounds"
    [13:01:21] [debug] Accessing element at index 65535 past array upper bound 1999
    [13:01:21] [debug] AMX backtrace:
    [13:01:21] [debug] #0 0009eb50 in public Itter_OnPlayerConnect () from SelfMade.amx
    [13:01:21] [debug] #1 00006c64 in public Streamer_OnPlayerConnect () from SelfMade.amx
    [13:01:21] [debug] #2 00006130 in public OnPlayerConnect () from SelfMade.amx
    [13:09:37] Incoming connection: 91.67.161.121:55003
    [13:09:37] [join] iGamer has joined the server (9:91.67.161.121)
    [13:09:37] [debug] Run time error 4: "Array index out of bounds"
    [13:09:37] [debug] Accessing element at index 65535 past array upper bound 1999
    [13:09:37] [debug] AMX backtrace:
    [13:09:37] [debug] #0 0009e8b0 in public Itter_OnPlayerConnect () from SelfMade.amx
    [13:09:37] [debug] #1 00006c64 in public Streamer_OnPlayerConnect () from SelfMade.amx
    [13:09:37] [debug] #2 00006130 in public OnPlayerConnect () from SelfMade.amx
    [13:10:46] [chat] [terminater2012]: (pfienst
    [13:11:20] [chat] [Darkrian]: ./zahlen ID BETRAG
    [13:14:44] [death] terminater2012 died 255
    [13:18:51] [part] iGamer has left the server (9:1)
    [13:20:23] Incoming connection: 91.56.215.53:58586
    [13:20:25] [join] Playeroflife has joined the server (9:91.56.215.53)
    [13:20:25] [debug] Run time error 4: "Array index out of bounds"
    [13:20:25] [debug] Accessing element at index 65535 past array upper bound 1999
    [13:20:25] [debug] AMX backtrace:
    [13:20:25] [debug] #0 0009e8b0 in public Itter_OnPlayerConnect () from SelfMade.amx
    [13:20:25] [debug] #1 00006c64 in public Streamer_OnPlayerConnect () from SelfMade.amx
    [13:20:25] [debug] #2 00006130 in public OnPlayerConnect () from SelfMade.amx
    [13:20:45] [debug] Server crashed while executing SelfMade.amx
    [13:20:45] [debug] AMX backtrace:
    [13:20:45] [debug] #0 native SendClientMessageToAll () [080cd550] from samp1994_2293
    [13:20:45] [debug] #1 00169220 in public CheckPing () from SelfMade.amx
    [13:20:45] [debug] System backtrace:
    [13:20:45] [debug] #0 f74710f3 in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
    [13:20:45] [debug] #1 f7468b61 in _ZN11crashdetect20PrintSystemBacktraceEPv () from plugins/crashdetect.so
    [13:20:45] [debug] #2 f746b405 in _ZN11crashdetect15SystemExceptionEPv () from plugins/crashdetect.so
    [13:20:45] [debug] #3 f7470c42 in ?? () from plugins/crashdetect.so
    [13:20:45] [debug] #4 f776c400 in ?? ()
    [13:20:45] [debug] #5 f753ceb1 in ?? () from /lib32/libc.so.6
    [13:20:45] [debug] #6 f7509b0f in _IO_vfprintf () from /lib32/libc.so.6
    [13:20:45] [debug] #7 f7527cec in vsprintf () from /lib32/libc.so.6
    [13:20:45] [debug] #8 080b4597 in ?? () from ./samp1994_2293
    [13:20:45] [debug] #9 080cd601 in ?? () from ./samp1994_2293
    [13:20:45] [debug] #10 080938e4 in ?? () from ./samp1994_2293
    [13:20:45] [debug] #11 f746b9d5 in _ZN11crashdetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
    [13:20:45] [debug] #12 f746f1ca in ?? () from plugins/crashdetect.so
    [13:20:45] [debug] #13 f7473136 in amx_Exec () from plugins/crashdetect.so
    [13:20:45] [debug] #14 f746b8b4 in _ZN11crashdetect9DoAmxExecEPii () from plugins/crashdetect.so
    [13:20:45] [debug] #15 f746f203 in ?? () from plugins/crashdetect.so
    [13:20:45] [debug] #16 080dbc65 in ?? () from ./samp1994_2293
    [13:20:45] [debug] #17 080b58cb in ?? () from ./samp1994_2293
    [13:20:45] [debug] #18 080b10a3 in ?? () from ./samp1994_2293
    [13:20:45] [debug] #19 f74dfca6 in __libc_start_main () from /lib32/libc.so.6
    [13:20:45] [debug] #20 0804b521 in ?? () from ./samp1994_2293[/pwn]

    bite um hilfe :(

    Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von MistaDubstep ()

  • Moin,
    "Array index out of bounds"

    Das bedeutet schonmal, dass ein Element eines Arrays außerhalb des Arrays ist,
    also:
    [pwn]
    new beispiel[3];
    beispiel[0] = 1;
    beispiel[1] = 1;
    beispiel[2] = 1;
    beispiel[3] = 1; // Fehler, da dieses Element nicht mehr existiert (es gibt nur beispiel[0] - beispiel[2])
    [/pwn]

    Wo genau der Fehler nun liegen könnte weiß ich aber gerade nicht,
    vll. wird bei OnPlayerConnect ja ein Array gesetzt, der nicht groß genug ist,
    also der Test größer ist, als der formatierte String oder so.
    Guck da erstmal bei OnPlayerConnect,
    an sonsten hat da vll. noch wer anders eine Idee?
    Gruß,
    Dennis
  • [pwn]new Repaircall[MAX_PLAYERS];[/pwn]
    MAX_PLAYERS ist eine Konstante, die die maximale Anzahl der möglichen Spieler auf dem Srever beinhaltet, NICHT die, die man in der server.cfg einstellt, sondern eine vordefinierte.
    Standart hat sie 500 (bzw. 800, je nachdem).

    Also gehen wir von dem normalem Server mit 500 aus, bedeutet "Repaircall[MAX_PLAYERS]" soviel wie "RepairCall[500]".
    Warum erstellst du unter OnPlayerConnect die Variable "Repaircall" eigentlich, wenn du sie oben schon erstellt hast?

    Wenn du oben "new Repaircall[MAX_PLAYERS];" hast, ist diese Variable für das GESAMTE Skript schon vorhanden.

    Du hast nun oben einen globalen Array mit dem Namen "Repaircall" erstellt, mit 500 Elementen.
    unter OnPlayerConnect erstellst du nun nochmal eine gleichnamige locale Variable,
    keinen Array, sondern eine normale Variable und gibst ihr den Wert "999".

    Du müsstest am besten die Variable unter OnPlayerConnect anders benennen.

    Wäre zumindest jetzt ein Fehler.
  • Mom,
    du verstehst das falsch,
    es geht nicht um diesen Wert,
    sondern darum, dass du einmal einen Array erstellst, der global fürs Skript ist UND eine gleichnamige Variable, die local ist.
    Ich weiß jetzt nicht, wozu du "new Repaircall=999;" nutzen willst,
    aber endweder musst du die Variable umbenennen,
    ODER dem Wert einem Element des Arrays zuweisen (z.B. Repaircall[0] = 999; ).
  • ok, nur jez kommt dieser fehler

    [17:22:18] [debug] #0 000c6558 in public S@@_OnPlayerConnect (playerid=7) at C:\Program Files (x86)\Rockstar Games\SAMP Server\gamemodes\SelfMade.pwn:6017
    [17:22:18] [debug] #1 00008288 in Debug_Print0 (... <1 variable argument>) at C:\Program Files (x86)\Rockstar Games\SAMP Server\pawno\include\foreach.inc:336
    [17:22:18] [debug] #2 00007620 in Debug_Print0 (... <1 variable argument>) at C:\Program Files (x86)\Rockstar Games\SAMP Server\pawno\include\streamer.inc:280

    der verursacht immer wenn einer connectet was das für ein scheiss? bitte hilfe