YSI 5X

Započeo Jovan Spasic, Maj 13, 2022, 22:13:08 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Dodao sam YSI ovaj noviji 5X i sad stvara mi warininge za timer znaci na koji god kod gde pravi warninge sam otisao bili su timeri problem zasto?
Deo skripte: [pawn]C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(532) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(1034) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(1219) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(4018) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5258) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5276) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5283) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5319) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5323) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5340) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5373) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5388) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5393) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5397) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5402) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5406) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5410) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5423) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5468) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5477) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5484) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5491) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5498) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5508) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5535) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5563) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5583) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5611) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Korisnik\Downloads\GTA\Edstret Gaming\gamemodes\EGaming.pwn(5619) : warning 208: function with tag result used before definition, forcing reparse
[Finished in 1.8s][/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [pawn]Vaš odgovor[/pawn]
Slika/video ingame problema(obavezno ako je ingame problem): link slike
Poslednja Izmena: Maj 15, 2022, 14:31:13 POSLE PODNE od Deleted User

Prvo stavis timer funkciju pa ga onda tek pozivas

Citat: Fr0z3n poslato Maj 13, 2022, 22:39:31 POSLE PODNE
Prvo stavis timer funkciju pa ga onda tek pozivas
Nije mi bas jasno sta si hteo da kazes ako mozes mi nekako kroz primer pokazati

Ovo ne smes:

Timer();

Timer [69] return;

Nego ovo

Timer [69] return;

Timer();

Znaci prvo napravis timer iznad pa ga onda pozivas ispod...



Citat: Fr0z3n poslato Maj 13, 2022, 22:44:58 POSLE PODNE
Ovo ne smes:

Timer();

Timer [69] return;

Nego ovo

Timer [69] return;

Timer();

Znaci prvo napravis timer iznad pa ga onda pozivas ispod...
Hvala ti nema vise warninga ali problem je sad sto kao nece da komplajluje pise samo [Finished in 1.8s] ne izbaci ostalo sto treba

Pokušaj da promeniš redosled biblioteka kako se učitavaju, to zna da pravi problem.
• Website: www.vasic.dev
Web Development & Cyber Security

Citat: Vasic poslato Maj 13, 2022, 23:06:52 POSLE PODNE
Pokušaj da promeniš redosled biblioteka kako se učitavaju, to zna da pravi problem.
Pa meni su obicno timeri na dnu skripte i svi su zajedno nisu odvojeni kad sam koristio stari YSI nije pravilo problema

Citat: Jovan Spasic poslato Maj 13, 2022, 23:09:37 POSLE PODNE
Pa meni su obicno timeri na dnu skripte i svi su zajedno nisu odvojeni kad sam koristio stari YSI nije pravilo problema
Kažem biblioteke (includes)
• Website: www.vasic.dev
Web Development & Cyber Security

Citat: Vasic poslato Maj 13, 2022, 23:10:23 POSLE PODNE
Kažem biblioteke (includes)
Pa evo izmenio sam malo al opet nece
[pawn]#include <a_samp>
#include <ysilib\YSI_Storage\y_ini>
#include <ysilib\YSI_Visual\y_commands>
#include <ysilib\YSI_Coding\y_timers>
#include <sscanf\sscanf2>
#include <streamer>
#include <fdialog>
#include <paused>
#include <YSI\y_va>
#define  OD_METHOD METHOD_BOX
#include <optidraw>
#include <modelsizes>
#include <fader>
#define  MAX_ANIM_DATA 100
#define  MAX_ANIM_STRING 512
#include <animated-textdraw>
#include <FCNPC>
#include <core>
#include <float>
//#include <ysilib\YSI_Coding\y_hooks>
//#include <ysilib\YSI_Data\y_foreach>
#include "../include/gl_common.inc"[/pawn]

Warning (upozorenje) ti kaze da si pozvao funkciju koja ima label (to jest return je nekog "tipa) pre nego sto si ga definisao.
Znaci pozivas tajmer pa tek onda imas funkciju sa labelom (timer callback), sto forsira compiler da prodje kod ponovo (sto uvelicava vreme za compile medju ostalim).

Imas tu dva resenja, prvo je da definises callback (timer funkciju) pre nego sto pozoves tajmer i to je sto ce sigurno raditi. I drugo je da deklarises prvo funkciju pa da je definises (znaci u pawn je prvo forward pa tek onda definises) i onda nije bitno kad je pozivas posto je vec deklarisana.

Citat: Deleted User poslato Maj 15, 2022, 00:10:33 PRE PODNE
Warning (upozorenje) ti kaze da si pozvao funkciju koja ima label (to jest return je nekog "tipa) pre nego sto si ga definisao.
Znaci pozivas tajmer pa tek onda imas funkciju sa labelom (timer callback), sto forsira compiler da prodje kod ponovo (sto uvelicava vreme za compile medju ostalim).

Imas tu dva resenja, prvo je da definises callback (timer funkciju) pre nego sto pozoves tajmer i to je sto ce sigurno raditi. I drugo je da deklarises prvo funkciju pa da je definises (znaci u pawn je prvo forward pa tek onda definises) i onda nije bitno kad je pozivas posto je vec deklarisana.
Juce sam poceo sve od ponovo ubacivati u nov kostur posto mi je mod od 0 i ubacujem 1 po 1 tajmere samo stavio na vrhu skripte iznad komandi itd i sad kompajluje