Problem oko SART

Započeo Jesteibice, April 15, 2020, 14:09:46 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Problem(error/warning): Obrne se slika ne znam kako da resim warning i ovo izbaci u log tj kresa srv nije mi se ranije desavalo ima li mozda neka druga verzija CA3.inc ?
Dio skripte:
//iz mape 
CreateArt3( bfbaner, 5, 1497.9098, -2286.9331, 16.1553, 0.0000, 0.0000, 90.0000 );

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
C:\Users\neman\Desktop\SAMP\BF MOD\aserver\pawno\include\CA3.inc(158) : warning 219: local variable "right" shadows a variable at a preceding level


//iz loga
[debug] Run time error 4: "Array index out of bounds"
[debug]  Attempted to read/write array element at index 2048 in array of size 2000
[debug] AMX backtrace:
[debug] #0 000423d0 in CreateArtInternal3 (ArtObject[][]=@018ec880, type=5, dynamic=0, Float:PosX=1497.90979, Float:PosY=-2286.93311, Float:PosZ=16.15530, Float:RotX=0.00000, Float:RotY=0.00000, Float:RotZ=90.00000, worldid=-1, ... <4 more arguments>) at C:\Users\neman\Desktop\SAMP\BF MOD\aserver\pawno\include\CA3.inc:213
[debug] #1 0003ff3c in CreateArt3 (ArtObject[][]=@018ec880, type=5, Float:PosX=1497.90979, Float:PosY=-2286.93311, Float:PosZ=16.15530, Float:RotX=0.00000, Float:RotY=0.00000, Float:RotZ=90.00000, Float:DrawDistance=300.00000) at C:\Users\neman\Desktop\SAMP\BF MOD\aserver\pawno\include\CA3.inc:29
[debug] #2 0004dba8 in KreirajObjekte () at BFRPGMAPE.pwn:567
[debug] #3 005b5bc4 in public CB_OnGameModeInit () at C:\Users\neman\Desktop\SAMP\BF MOD\aserver\gamemodes\BFRPG.pwn:28813
[debug] #4 0001f890 in public zcmd_OnGameModeInit () at C:\Users\neman\Desktop\SAMP\BF MOD\aserver\pawno\include\newsamp.inc:444
[debug] #5 native CallLocalFunction () in samp-server.exe
[debug] #6 0001d740 in ?? () at C:\Users\neman\Desktop\SAMP\BF MOD\aserver\pawno\include\zcmd.inc:68
[debug] #7 0000dabc in public ScriptInit_OnGameModeInit () at C:\Users\neman\Desktop\SAMP\BF MOD\aserver\pawno\include\YSI\y_hooks/impl.inc:498
[debug] #8 000073f0 in public SSCANF_OnGameModeInit () at C:\Users\neman\Desktop\SAMP\BF MOD\aserver\pawno\include\YSI\internal\..\y_scriptinit.inc:171
[debug] #9 native CallLocalFunction () in samp-server.exe
[debug] #10 000009f0 in public OnGameModeInit () at C:\Users\neman\Desktop\SAMP\BF MOD\aserver\pawno\include\sscanf2.inc:82

Slika/video ingame problema(obavezno ako je ingame problem):

Sve ti kaze, napravljen je array velicine 2000, a ti si pokusao da iskoristis vise od toga.

Otvori include i daj liniju 158

Takodje, vidi na koji nacin radi CA3, procitaj unutar include-a

Citat: V01D poslato April 15, 2020, 14:29:35 POSLE PODNE
Sve ti kaze, napravljen je array velicine 2000, a ti si pokusao da iskoristis vise od toga.

Otvori include i daj liniju 158

Takodje, vidi na koji nacin radi CA3, procitaj unutar include-a
//my old magic with transformations
	new Float:up[3];
	up[0] = floatsin(ang[1], degrees)*floatcos(ang[2], degrees) + floatsin(ang[0], degrees)*floatsin(ang[2], degrees)*floatcos(ang[1], degrees);
	up[1] = floatsin(ang[2], degrees)*floatsin(ang[1], degrees) - floatsin(ang[0], degrees)*floatcos(ang[1], degrees)*floatcos(ang[2], degrees);
	up[2] = -floatcos(ang[0], degrees)*floatcos(ang[1], degrees);
       //158-----------------
        new Float:right[3];
	right[0] = -floatsin(ang[2], degrees)*floatcos(ang[0], degrees);
	right[1] = floatcos(ang[0], degrees)*floatcos(ang[2], degrees);
	right[2] = -floatsin(ang[0], degrees);
	new Float:frwd[3];
	frwd[0] = floatcos(ang[1], degrees)*floatcos(ang[2], degrees) - floatsin(ang[0], degrees)*floatsin(ang[2], degrees)*floatsin(ang[1], degrees); 
	frwd[1] = floatsin(ang[2], degrees)*floatcos(ang[1], degrees) + floatsin(ang[0], degrees)*floatsin(ang[1], degrees)*floatcos(ang[2], degrees);
	frwd[2] = floatcos(ang[0], degrees)*floatsin(ang[1], degrees);
	new Float:secnd[3];