Nex-AC

Započeo V01D, Novembar 12, 2021, 15:28:36 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): \include\nex-ac.inc(7597) : error 025: function heading differs from prototype
Deo skripte: Iz nex-ac :
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)

Iz moda ista funkcija :
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z) {

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): Nema

Ili sam ja retardiran ili nisam siguran sta je problem  ::)
Poslednja Izmena: Novembar 15, 2021, 15:11:44 POSLE PODNE od M Ө M Σ N Z I

Moze biti da neki drugi include pogresno hookuje OnUnoccupiedVehicleUpdate
Npr.
public OnPlayerConnect(playerid) {

	#if defined EX_OnPlayerConnect
		return EX_OnPlayerConnect(playerid);
	#else
		return 1;
	#endif
}
#if defined _ALS_OnPlayerConnect
	#undef OnPlayerConnect
#else
	#define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect EX_OnPlayerConnect
#if defined EX_OnPlayerConnect
	forward EX_OnPlayerConnect(playerid, var1);
#endif

public OnPlayerConnect(playerid) {
	return 1;
}

forward EX_OnPlayerConnect(playerid, var1);

Sada je problem sto sam proverio svaki include, nijedan ne koristi OnUnoccupiedVehicleUpdate

Citat: V01D poslato Novembar 12, 2021, 18:13:04 POSLE PODNE
Sada je problem sto sam proverio svaki include, nijedan ne koristi OnUnoccupiedVehicleUpdate
Imas ga definisano minimum u a_samp ili a_vehicles (koji ti je mozda outdated :D )
Prvo skini 0.3.7 R2 server, i update includove iz njega u tvom projektu.

Ako ti svejedno nastavi, proveri a_samp da li se razlikuje OnUnoccupiedVehicleUpdate tu i u nex-ac (ne verujem ali ides redom naravno...)

E ako ti je sve to ok, a svejedno imas taj error, vs code, otvoris server kao projekat, desni klik na gamemodes, find in folder i trazis OnUnoccupiedVehicleUpdate.
Ako tu ne nadjes, onda na includes folder iz pawno (ili gde su ti includovi) i isto tako find in folder i trazis OnUnoccupiedVehicleUpdate, mozda ti pokaze negde da nisi video.

Znam da znas sta radis, ali covek se najvise zajebe na banalnim glupostima.
Nije dzabe ovaj meme

Citat: Deleted User poslato Novembar 12, 2021, 18:35:44 POSLE PODNE
Imas ga definisano minimum u a_samp ili a_vehicles (koji ti je mozda outdated :D )
Prvo skini 0.3.7 R2 server, i update includove iz njega u tvom projektu.

Ako ti svejedno nastavi, proveri a_samp da li se razlikuje OnUnoccupiedVehicleUpdate tu i u nex-ac (ne verujem ali ides redom naravno...)

E ako ti je sve to ok, a svejedno imas taj error, vs code, otvoris server kao projekat, desni klik na gamemodes, find in folder i trazis OnUnoccupiedVehicleUpdate.
Ako tu ne nadjes, onda na includes folder iz pawno (ili gde su ti includovi) i isto tako find in folder i trazis OnUnoccupiedVehicleUpdate, mozda ti pokaze negde da nisi video.

Znam da znas sta radis, ali covek se najvise zajebe na banalnim glupostima.
Nije dzabe ovaj meme


Okej, probao sam sve, bas sve sto si rekao, idalje isti kurac. Svaki include sam proverio, apsolutno sve.

Da li moze praviti problem sto je YSI 3.1? Mada Ideal mod isto koristi ovaj YSI i nex-ac, nije mi jasno..

Da li moze biti problem sto je YSI 3.1? Neznam, ne verujem (ali opet nije iskljuceno).
Daj listu includova, mozda vidim neki da znam da se hook na tu funkciju na neki nacin... (Mada sa druge strane da ima vec ti bi video...)

Verovatno si ovo uradio vec, ali eto, za svaki slucaj ako nisi da probas. Prvo prebaci nex-ac odmah ispod a_samp (ako redefinises MAX_PLAYERS, onda naravno odmah ispod a_samp redefine MAX_PLAYERS, i odmah ispod toga include nex-ac)
Prvo to probaj ako nisi, drugo, komentarisi nex-ac probaj bez njega, vidi da li ti izbacuje taj error.

I onda vidi ako imas u modu negde OnUnoccupiedVehicleUpdate, komentarisi to tamo vidi da li ce ti se maci taj error.

#include <a_samp>

#undef MAX_PLAYERS
#define MAX_PLAYERS                                                          1000

#include <nex-ac>

#define FCNPC_DISABLE_VERSION_CHECK

#include <SKY>
#include <weapon-config>

#if defined _ALS_OnPlayerGiveDamage
    #undef OnPlayerGiveDamage
#else
    #define _ALS_OnPlayerGiveDamage
#endif
#define OnPlayerGiveDamage NULL_OnPlayerGiveDamage
#if defined NULL_OnPlayerGiveDamage
    forward NULL_OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart);
#endif
#if defined _ALS_OnPlayerTakeDamage
    #undef OnPlayerTakeDamage
#else
    #define _ALS_OnPlayerTakeDamage
#endif
#define OnPlayerTakeDamage NULL_OnPlayerTakeDamage
#if defined NULL_OnPlayerTakeDamage
    forward NULL_OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart);
#endif

#include <a_objects>
#include <streamer>

#include <modelsizes>
#define OD_METHOD 0
#include <optidraw>

#include <sscanf2>
#include <YSI\y_ini>

#define FOREACH_NO_BOTS
#define FOREACH_NO_ACTORS

#include <YSI\y_iterate>
#include <YSI\y_timers>
#include <YSI\y_va>
#include <YSI\y_flooding>
#include <utils>
#include <Pawn.CMD>
#include <newsamp>
#include <progress2>
#include <mapandreas>
#include <mSelection>
#include <eSelection>
#include <GetVehicleColor>
#include <dini>
#include <fly>
#include <PawnPlus>
#include <RouteConnector>
#include <mapHighlight>
#include <colandreas>
#include <3DTryg>
#include <GH_stamina>
#include <vehiclePositions>


Lista include-ova

Takodje, probao sam da stavim na vrh, kao sto se vidi iznad, ali onda izbacuje :

include\nex-ac.inc(7853) : warning 202: number of arguments does not match definition
include\nex-ac.inc(7853) : warning 202: number of arguments does not match definition
include\nex-ac.inc(7853) : warning 202: number of arguments does not match definition
include\nex-ac.inc(7853) : warning 202: number of arguments does not match definition
include\nex-ac.inc(7853) : warning 202: number of arguments does not match definition
include\nex-ac.inc(7853) : warning 202: number of arguments does not match definition
include\nex-ac.inc(7911) : error 025: function heading differs from prototype


Linije :

#if defined ac_OnUnoccupiedVehicleUpdate
		#if defined OnTrailerUpdate
			new ac_a = ac_OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, new_x, new_y, new_z, vel_x, vel_y, vel_z); //Ova
		#elseif defined GetServerTickRate
			new ac_a = ac_OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, new_x, new_y, new_z);
		#else
			new ac_a = ac_OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat);
		#endif
	#endif


#define OnUnoccupiedVehicleUpdate ac_OnUnoccupiedVehicleUpdate
#if defined ac_OnUnoccupiedVehicleUpdate
	#if defined OnTrailerUpdate
		forward ac_OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z); //ova
	#elseif defined GetServerTickRate
		forward ac_OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z);
	#else
		forward ac_OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat);
	#endif
#endif



Takodje sam iz moda izbacio ceo callback OnUnoccupiedVehicleUpdate
Poslednja Izmena: Novembar 12, 2021, 22:56:10 POSLE PODNE od V01D



Predpostavicu i da kad comment nex-ac da greska nestane.


#if defined ac_OnUnoccupiedVehicleUpdate
		#if defined OnTrailerUpdate
			new ac_a = ac_OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, new_x, new_y, new_z, vel_x, vel_y, vel_z); //Ova
		#elseif defined GetServerTickRate
			new ac_a = ac_OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, new_x, new_y, new_z);
		#else
			new ac_a = ac_OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat);
		#endif
	#endif

Tek sad mi nista nije jasno posto ako je ovo prvi include nakon a_samp, nema nigde da bude definisano OnUnoccupiedVehicleUpdate osim kao forward u a_samp koji treba da bude isti kao taj najgorni u kodu iznad.
Jesi siguran da koristis pravilan compajler? Da ne gledas u jednom folderu a da ti includove ne koristi iz nekog 15stog foldera?

Sta koristis VS Code, Sublime, Pawno? :D (i proveri path do pawncc foldera)

Dap, siguran sam xD, koristim sublime i jedan compiler za vecinu mojih modova na kojima radim

forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z);


Ovo iznad je iz a_samp

Iz nex-ac :

#if defined OnTrailerUpdate
	public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
#elseif defined GetServerTickRate
	public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z)
#else
	public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat)
#endif


Ocigledno da sam poludeo hahahahhahaha

Provjeri jesu li odgovarajuci parametri i u modu i u includovima.

Skini samp server i samo includove sto su ti potrebni ubaci i probaj onda.

https://github.com/oscar-broman/Prawn/blob/master/include/YSI/y_hooks/impl.inc
i koristi ovaj
zvoni motorola kad je secemo na pola

Citat: hulkberry poslato Novembar 13, 2021, 22:02:05 POSLE PODNE
Provjeri jesu li odgovarajuci parametri i u modu i u includovima.

Skini samp server i samo includove sto su ti potrebni ubaci i probaj onda.

https://github.com/oscar-broman/Prawn/blob/master/include/YSI/y_hooks/impl.inc
i koristi ovaj

Odustao sam na kraju, tako da moze lock :/