y_timers


Započeo Darkic, Februar 22, 2020, 18:56:41 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Do sada sam radio sa obicnim timerima, medjutim odlucio sam se za y timere zbog bolje optimizacije. Prvi put radim i ne znam u cemu je problem. Inace verzija YSI-a je 5.1
C:\Users\Desktop\test server\gamemodes\timeri.pwn(15) : error 017: undefined symbol "defer"
C:\Users\Desktop\test server\gamemodes\timeri.pwn(15) : error 017: undefined symbol "TestTimer"
C:\Users\Desktop\test server\gamemodes\timeri.pwn(29) : error 010: invalid function or declaration
C:\Users\Desktop\test server\pawno\include\YSI\y_timers.inc(76) : symbol is never used: "USE@YSI_Coding@y_timers"
[/b]
Dio skripte:
#include <a_samp>
#include <sscanf2>
#include <streamer>
#include <pawn.CMD>
#include <YSI\y_timers>

main()
{
	print("MOD JE STARTOVAN");
	print("----------------");
}

public OnGameModeInit()
{
	defer TestTimer(); // LINIJA 15
	return 1;
}

timer TestTimer[1000]() //LINIJA 29
{
	print("TEST PORUKA!");
}

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]vaš odgovor[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): link slike

Umesto:
#include <YSI\y_timers>

koristi:
#include <YSI_Coding\y_timers>
[Include] > Optidraw
[Include] > Model-Sizes-SQL

Pokusavao sam, crasha mi pawno https://prnt.sc/r67b07
Nakon toga izbaci errore

C:\Users\Desktop\test server\pawno\include\YSI_Coding\y_timers\..\..\YSI_Core\y_core\y_utils_impl.inc(428) : error 017: undefined symbol "isnull"
C:\Users\Desktop\test server\pawno\include\YSI_Coding\y_timers\..\..\YSI_Core\y_core\y_utils_impl.inc(428) : error 010: invalid function or declaration
Poslednja Izmena: Februar 22, 2020, 19:04:36 POSLE PODNE od Darkic

Preporucujem ti da obrises ceo YSI lib i svaki include vezan za njega, skines poslednju verziju i ubacis.

Evo ti definicija za isnull:
#if !defined isnull
	#define isnull(%1) \
		((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
#endif


Btw, koju verziju compilera koristis i koji?
[Include] > Optidraw
[Include] > Model-Sizes-SQL

Default compiler

Kada skinem poslednju verziju YSI-a, trazi mi da ubacim milion nekih fajlova
Could not include "https://github.com/Zeex/amx_assembly" - ensure its files are in "include\amx_assembly\"


Kada sve to odradim, opet mi crasha pawno. Nije ni bitno batalicu YSI i vracam se na obicne timere
Poslednja Izmena: Februar 22, 2020, 19:12:22 POSLE PODNE od Darkic


Sa tim compailerom je malo bolja situacija
C:\Users\Desktop\test server\pawno\include\YSI_Coding\y_timers\..\y_malloc\y_malloc_warning.inc(8) : warning 237: user warning: y_malloc heap allocation is unstable.  Use `YSI_NO_HEAP_MALLOC` to disable it, or `YSI_YES_HEAP_MALLOC` to disable this warning: git.io/YSI_HEAP_MALLOC
C:\Users\Desktop\test server\pawno\include\YSI_Coding\y_timers\..\y_malloc\y_malloc_heapalloc.inc(166) : warning 239: literal array/string passed to a non-const parameter
C:\Users\Desktop\test server\pawno\include\YSI_Coding\y_timers\..\y_malloc\y_malloc_heapalloc.inc(167) : warning 239: literal array/string passed to a non-const parameter


Previse cimanja radi minimalne optimizacije. I obicni timeri zavrsavaju posao

Nije lose koristiti y_timers i uvek je dobro ostati up to date.
Zeexov compiler ti je em brzi em dobija redovan support.

Na pocetak skripte dodaj
#define YSI_NO_HEAP_MALLOC

ako koristis y_ini OBAVEZNO koristi ovo gore, ali ako hoces recimo da ubrzas mod i koristis na primer mysql koristi:

#define YSI_YES_HEAP_MALLOC

[Include] > Optidraw
[Include] > Model-Sizes-SQL