function header differs from prototype
#1

Hi, I need some help here, I was compiling a gamemode and this happened :
error is function head differs from prototype but I can't see anything wrong, The line is:
Код:
public OnGameModeExit()
and the whole line:
Код:
public OnGameModeExit()
{
    print("[OnGameModeExit] Shutting down...");

	djson_GameModeExit();

	// First param: print each individual entity when it's saved
	// Second param: print the total amount of entities saved

	SavePlayerVehicles();
	SaveSafeboxes();
	SaveTents();
	SaveDefences();
	SaveSigns();

	SaveSprayTags();

	print("\nSave Complete! Safe to shut down.");
    return 1;
}
Reply
#2

Forgive me if i am wrong, but line 5 in this code.. Sholdn't it go like this:
Код:
djson_OnGameModeExit();
Reply
#3

Make sure you're using the right samp include.
Reply
#4

Quote:
Originally Posted by LeroyII
Посмотреть сообщение
Forgive me if i am wrong, but line 5 in this code.. Sholdn't it go like this:
Код:
djson_OnGameModeExit();
Nope, just check the DJson Include page. It should be as he has it.


As stated above, you need the latest (0.3z R4) includes in your /pawno/include folder.
Reply
#5

show me the line before ongamemodeinit.
Reply
#6

Ok but what 0.3z R4 includes? which one?
btw there are defines before ongamemodeinit
Код:
public OnGameModeInit()
{
	print("\n[OnGameModeInit] Initialising 'Main'...");

	OnGameModeInit_Setup();

	#if defined main_OnGameModeInit
		return main_OnGameModeInit();
	#else
		return 1;
	#endif
}
#if defined _ALS_OnGameModeInit
	#undef OnGameModeInit
#else
	#define _ALS_OnGameModeInit
#endif
 
#define OnGameModeInit main_OnGameModeInit
#if defined main_OnGameModeInit
	forward main_OnGameModeInit();
#endif
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)