problem
#1

Get these errors when compile the gamemode.

Код:
SIF\Button.pwn(774) : error 001: expected token: ";", but found "-identifier-"
SIF\Button.pwn(780) : error 010: invalid function or declaration
SIF\Button.pwn(784) : error 021: symbol already defined: "Iterator@"
SIF\Button.pwn(809) : error 017: undefined symbol "Iterator@btn_CurrentlyNearIndex"
SIF\Button.pwn(809) : warning 215: expression has no effect
SIF\Button.pwn(809) : error 001: expected token: ";", but found "]"
SIF\Button.pwn(809) : error 029: invalid expression, assumed zero
SIF\Button.pwn(809) : fatal error 107: too many error messages on one line
Код:
#define INVALID_BUTTON_ID	(-1)


enum E_BTN_DATA
{
			btn_area,
Text3D:		btn_label,
Float:		btn_posX,
Float:		btn_posY,
Float:		btn_posZ,
Float:		btn_size,
			btn_world,
			btn_interior,
			btn_link,
			btn_text[BTN_MAX_TEXT],

			btn_exData
}

enum e_button_range_data
{
			btn_buttonId,
Float:		btn_distance
}


new
			btn_Data[BTN_MAX][E_BTN_DATA],
Iterator:	btn_Index<BTN_MAX>
	#if defined DEBUG_LABELS_BUTTON
		,
			btn_DebugLabelType,
			btn_DebugLabelID[BTN_MAX]
	#endif
(780)         ;

static
			btn_CurrentlyNear[MAX_PLAYERS][BTN_MAX_INRANGE],
(784)Iterator:	btn_CurrentlyNearIndex[MAX_PLAYERS]<BTN_MAX_INRANGE>,
			btn_CurrentlyPressing[MAX_PLAYERS];


forward OnButtonPress(playerid, buttonid);
forward OnButtonRelease(playerid, buttonid);
forward OnPlayerEnterButtonArea(playerid, buttonid);
forward OnPlayerLeaveButtonArea(playerid, buttonid);


static BUTTON_DEBUG = -1;
Код:
hook OnScriptInit()
{
	BUTTON_DEBUG = sif_debug_register_handler("SIF/Button");
	sif_d:SIF_DEBUG_LEVEL_CALLBACKS:BUTTON_DEBUG("[OnScriptInit]");

(809)	Iter_Init(btn_CurrentlyNearIndex);

	for(new i; i < MAX_PLAYERS; i++)
	{
		btn_CurrentlyPressing[i] = INVALID_BUTTON_ID;
	}

	#if defined DEBUG_LABELS_BUTTON
		btn_DebugLabelType = DefineDebugLabelType("BUTTON", 0xFF0000FF);
	#endif
}

hook OnPlayerConnect(playerid)
{
	sif_dp:SIF_DEBUG_LEVEL_CALLBACKS:BUTTON_DEBUG("[OnPlayerConnect]")<playerid>;
	Iter_Clear(btn_CurrentlyNearIndex[playerid]);
	btn_CurrentlyPressing[playerid] = INVALID_BUTTON_ID;
}
Reply
#2

I guess that obviously that code isn't meant to be straightforward compiled, but used as a library. You include it, perhaps include some other includes then make some code and finally compile that.
Reply
#3

show us ur lines
Reply
#4

I don't think its straightfoward compiled, becouse in the main script its included...

Код:
#include <SIF>	
#include <SIF\extensions\ItemArrayData>
#include <SIF\extensions\ItemList>
#include <SIF\extensions\InventoryDialog>
#include <SIF\extensions\InventoryKeys>
#include <SIF\extensions\ContainerDialog>
#include <SIF\extensions\Craft>
#include <SIF\extensions\DebugLabels>
When i compile the main script i got those errors, but when i putted YSI 3.1 versions there wasn't those errors they only appeared when i updated it to YSI 4.0.


Fixed it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)