Hitno pomoc

Započeo JackScript_
2. Jul 2020.
487
pregleda
6
postova
JackScript_
2
Wheel Man
2. Jul 2020.
Problem(error/warning): Kada kompajlujem skriptu izbaci mi error:

C:\Documents and Settings\CEL1C.dev\Desktop\gmp\panama.pwn(55420) : error 032: array index out of bounds (variable "TDEditor_TD")
C:\Documents and Settings\CEL1C.dev\Desktop\gmp\panama.pwn(55430) : error 032: array index out of bounds (variable "TDEditor_TD")
C:\Documents and Settings\CEL1C.dev\Desktop\gmp\panama.pwn(55445) : error 032: array index out of bounds (variable "TDEditor_TD")
C:\Documents and Settings\CEL1C.dev\Desktop\gmp\panama.pwn(55455) : error 032: array index out of bounds (variable "TDEditor_TD")
C:\Documents and Settings\CEL1C.dev\Desktop\gmp\panama.pwn(55470) : error 032: array index out of bounds (variable "TDEditor_TD")
C:\Documents and Settings\CEL1C.dev\Desktop\gmp\panama.pwn(55480) : error 032: array index out of bounds (variable "TDEditor_TD")
C:\Documents and Settings\CEL1C.dev\Desktop\gmp\panama.pwn(55495) : error 032: array index out of bounds (variable "TDEditor_TD")
C:\Documents and Settings\CEL1C.dev\Desktop\gmp\panama.pwn(55505) : error 032: array index out of bounds (variable "TDEditor_TD")
C:\Documents and Settings\CEL1C.dev\Desktop\gmp\panama.pwn(55520) : error 032: array index out of bounds (variable "TDEditor_TD")
C:\Documents and Settings\CEL1C.dev\Desktop\gmp\panama.pwn(55530) : error 032: array index out of bounds (variable "TDEditor_TD")

Deo skripte:

CMD:bojatd(playerid, params[])
{
    new stringic;
    if(sscanf(params, "s", stringic)) return KORISCENJE(playerid, "/bojatd [crvena-default-zuta-narandzasta-roza]");
    if(strcmp(stringic, "crvena", true) == 0)
    {
        TextDrawColor(TDEditor_TD, 0xDB1605FF);
        TextDrawColor(TDEditor_TD, 0xDB1605FF);
        TextDrawColor(TDEditor_TD, 0xDB1605FF);
        TextDrawColor(TDEditor_TD, 0xDB1605FF);
        TextDrawColor(TDEditor_TD, 0xDB1605FF);
        TextDrawColor(TDEditor_TD, 0xDB1605FF);
        TextDrawColor(TDEditor_TD, 0xDB1605FF);
        TextDrawColor(TDEditor_TD, 0xDB1605FF);
        TextDrawColor(TDEditor_TD, 0xDB1605FF);
        TextDrawColor(TDEditor_TD, 0xDB1605FF);
        TextDrawColor(TDEditor_TD, 0xDB1605FF);
        TextDrawColor(ObavestenjeTD, 0xDB1605FF);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,ObavestenjeTD);
    }
    if(strcmp(stringic, "default", true) == 0)
    {
        TextDrawColor(TDEditor_TD, 7596799);
        TextDrawColor(TDEditor_TD, 7596799);
        TextDrawColor(TDEditor_TD, 7596799);
        TextDrawColor(TDEditor_TD, 7596799);
        TextDrawColor(TDEditor_TD, 7596799);
        TextDrawColor(TDEditor_TD, 7596799);
        TextDrawColor(TDEditor_TD, 0xFFFFFFFF);
        TextDrawColor(TDEditor_TD, 7596799);
        TextDrawColor(TDEditor_TD, 7596799);
        TextDrawColor(TDEditor_TD, 7596799);
        TextDrawColor(TDEditor_TD, 7596799);
        TextDrawColor(ObavestenjeTD, 7596799);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,ObavestenjeTD);
    }
    if(strcmp(stringic, "zuta", true) == 0)
    {
        TextDrawColor(TDEditor_TD, 0xFFFF00AA);
        TextDrawColor(TDEditor_TD, 0xFFFF00AA);
        TextDrawColor(TDEditor_TD, 0xFFFF00AA);
        TextDrawColor(TDEditor_TD, 0xFFFF00AA);
        TextDrawColor(TDEditor_TD, 0xFFFF00AA);
        TextDrawColor(TDEditor_TD, 0xFFFF00AA);
        TextDrawColor(TDEditor_TD, 0xFFFF00AA);
        TextDrawColor(TDEditor_TD, 0xFFFF00AA);
        TextDrawColor(TDEditor_TD, 0xFFFF00AA);
        TextDrawColor(TDEditor_TD, 0xFFFF00AA);
        TextDrawColor(TDEditor_TD, 0xFFFF00AA);
        TextDrawColor(ObavestenjeTD, 0xFFFF00AA);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,ObavestenjeTD);
    }
    if(strcmp(stringic, "narandzasta", true) == 0)
    {
        TextDrawColor(TDEditor_TD, 0xFFAF00FF);
        TextDrawColor(TDEditor_TD, 0xFFAF00FF);
        TextDrawColor(TDEditor_TD, 0xFFAF00FF);
        TextDrawColor(TDEditor_TD, 0xFFAF00FF);
        TextDrawColor(TDEditor_TD, 0xFFAF00FF);
        TextDrawColor(TDEditor_TD, 0xFFAF00FF);
        TextDrawColor(TDEditor_TD, 0xFFAF00FF);
        TextDrawColor(TDEditor_TD, 0xFFAF00FF);
        TextDrawColor(TDEditor_TD, 0xFFAF00FF);
        TextDrawColor(TDEditor_TD, 0xFFAF00FF);
        TextDrawColor(TDEditor_TD, 0xFFAF00FF);
        TextDrawColor(ObavestenjeTD, 0xFFAF00FF);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,ObavestenjeTD);
    }
    if(strcmp(stringic, "roza", true) == 0)
    {
        TextDrawColor(TDEditor_TD, 0xDF0172FF);
        TextDrawColor(TDEditor_TD, 0xDF0172FF);
        TextDrawColor(TDEditor_TD, 0xDF0172FF);
        TextDrawColor(TDEditor_TD, 0xDF0172FF);
        TextDrawColor(TDEditor_TD, 0xDF0172FF);
        TextDrawColor(TDEditor_TD, 0xDF0172FF);
        TextDrawColor(TDEditor_TD, 0xDF0172FF);
        TextDrawColor(TDEditor_TD, 0xDF0172FF);
        TextDrawColor(TDEditor_TD, 0xDF0172FF);
        TextDrawColor(TDEditor_TD, 0xDF0172FF);
        TextDrawColor(TDEditor_TD, 0xDF0172FF);
        TextDrawColor(ObavestenjeTD, 0xDF0172FF);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,TDEditor_TD);
        TextDrawShowForPlayer(playerid,ObavestenjeTD);
    }
    SendClientMessage(playerid,-1,"{37A4DB} {FFFFFF}Uspesno ste promenili boju TD-ova.");
    return 1;
}

Debug iz server_loga: //
Slika/video ingame problema: Nije in game
Daya
4
Enforcer
2. Jul 2020.
Pošalji new od "TDEditor_TD"
JackScript_
2
Wheel Man
2. Jul 2020.
Richter wrote on July 2, 2020, 7:39 pm:
Pošalji new od "TDEditor_TD"

new Text:TDEditor_TD;
Daya
4
Enforcer
2. Jul 2020.
Imaš 38 elemenata u Array-u, to znači da možeš koristiti 0-37, svaki array počinje s 0, a ti pokušavaš mijenjati 38 koji nije zadan kao npr "TextDrawColor(TDEditor_TD, 0xDB1605FF);" i zbog toga dobivaš errore.

Ne znam da li razumiješ, ne znam kako objasnit to xd
Grebovic_Danijel
5
Godfather
2. Jul 2020.
Obrisi ovu liniju svugde, jer array kad praviš brojiš i nulu znaci imas 37 i ne možeš preko toga

TextDrawShowForPlayer(playerid,TDEditor_TD);
JackScript_
2
Wheel Man
2. Jul 2020.
Shvatio,hvala
LOCK

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha