MapIcon Compile Error
#1

When i compile he give a error

Код:
C:\Documents and Settings\Gebruiker\Bureaublad\zistof 5 gamemode\zistof 5 gamemode\gamemodes\zistof.pwn(4) : fatal error 100: cannot read from file: "mapicon"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
but i have in include mapicon.inc

how can that and whats the problem
Reply
#2

may be you are using #include "mapicon" instead of #include "mapicon.inc" and that is a mistake

file mapicon.inc MUST be in includes directory near compiler
Reply
#3

i have this

Код:
#include <a_samp.inc>
#include <float.inc>
#include <time.inc>
#include <mapicon.inc>
#include <file.inc>
#include <utils.inc>
but he say

Код:
C:\Documents and Settings\Gebruiker\Bureaublad\zistof 5 gamemode\zistof 5 gamemode\gamemodes\zistof.pwn(4) : fatal error 100: cannot read from file: "mapicon.inc"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
again
Reply
#4

Use this:
Код:
#include <a_samp>
#include <float>
#include <time>
#include <mapicon>
#include <file>
#include <utils>
Reply
#5

SpiderPork is absolutely right
Reply
#6

i have that already
Reply
#7

Hi how fix i this ?

Код:
C:\Documents and Settings\Gebruiker\Bureaublad\zistof 5 gamemode\zistof 5 gamemode\pawno\include\mapicon.inc(20) : error 017: undefined symbol "MAX_PLAYERS"
C:\Documents and Settings\Gebruiker\Bureaublad\zistof 5 gamemode\zistof 5 gamemode\pawno\include\mapicon.inc(25) : error 017: undefined symbol "MAX_PLAYERS"
C:\Documents and Settings\Gebruiker\Bureaublad\zistof 5 gamemode\zistof 5 gamemode\pawno\include\mapicon.inc(25) : error 009: invalid array size (negative, zero or out of bounds)
C:\Documents and Settings\Gebruiker\Bureaublad\zistof 5 gamemode\zistof 5 gamemode\pawno\include\mapicon.inc(60) : error 017: undefined symbol "SetTimer"
C:\Documents and Settings\Gebruiker\Bureaublad\zistof 5 gamemode\zistof 5 gamemode\pawno\include\mapicon.inc(60) : warning 215: expression has no effect
C:\Documents and Settings\Gebruiker\Bureaublad\zistof 5 gamemode\zistof 5 gamemode\pawno\include\mapicon.inc(60) : warning 215: expression has no effect
C:\Documents and Settings\Gebruiker\Bureaublad\zistof 5 gamemode\zistof 5 gamemode\pawno\include\mapicon.inc(60) : warning 215: expression has no effect
C:\Documents and Settings\Gebruiker\Bureaublad\zistof 5 gamemode\zistof 5 gamemode\pawno\include\mapicon.inc(60) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Gebruiker\Bureaublad\zistof 5 gamemode\zistof 5 gamemode\pawno\include\mapicon.inc(60) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Gebruiker\Bureaublad\zistof 5 gamemode\zistof 5 gamemode\pawno\include\mapicon.inc(60) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
Mapicon.inc :

Код:
//////////////////////////////////////
/// Icon Control          ///
///                ///
///                ///
///                ///
///     Copyright by Rafelder ///
//////////////////////////////////////

#define MAX_ICONS 1000
#define MAX_SHOWED_MAPICONS 32 //Don't write more than 32!

new Float:XM[MAX_ICONS];
new Float:YM[MAX_ICONS];
new Float:ZM[MAX_ICONS];

new MarkerM[MAX_ICONS];
new ColorM[MAX_ICONS];

new IsValid[MAX_ICONS];
new Show[MAX_PLAYERS][MAX_ICONS];

new IconidM=-1;
new Set_Timer=0;
new Count=0;
new ShowedForPlayer[MAX_PLAYERS];
forward StreamTimer();


/*
native CreateMapIcon(markerid, color, Float:X, Float:Y, Float:Z);
native DestroyMapIcon(iconid);
native ResetMapIconVariables(playerid);

native IsValidMapIcon(iconid);
native IsIconActivatedForPlayer(playerid, iconid);
native IsIconActivatedForAll(iconid);

native SetMapIconPos(iconid, Float:X, Float:Y, Float:Z);
native SetMapIconIcon(iconid, markerid, color);
native SetMapIconColor(iconid, color);

native GetMapIconPos(iconid, &Float:X, &Float:Y, &Float:Z);
native GetMapIconIcon(iconid);
native GetMapIconColor(iconid);

native ShowMapIconForPlayer(playerid, iconid);
native ShowMapIconForAll(iconid);
native ShowAllMapIconForPlayer(playerid);
native ShowAllMapIconForAll();
native DisableMapIconForPlayer(playerid, iconid);
native DisableMapIconForAll(iconid);
native DisableAllMapIconForPlayer(playerid);
native DisableAllMapIconForAll();
*/

/***************************CREATE***************************/
stock CreateMapIcon(markerid, color, Float:X, Float:Y, Float:Z)
{
	if (Set_Timer == 0) {
	SetTimer("StreamTimer", 200, 1);
	Set_Timer=1;
	}

	if (IconidM >= MAX_ICONS) return 0;
	IconidM++;
	IsValid[IconidM]=1;
	XM[IconidM]=X;
	YM[IconidM]=Y;
	ZM[IconidM]=Z;
	MarkerM[IconidM]=markerid;
	ColorM[IconidM]=color;
	for(new i=0; i<MAX_PLAYERS; i++) {
	Show[i][IconidM]=1;
	}
	return IconidM;
}

stock DestroyMapIcon(iconid) 
{
	IsValid[iconid]=0;
	XM[iconid]=0.0;
	YM[iconid]=0.0;
	ZM[iconid]=0.0;
	MarkerM[iconid]=0;
	ColorM[iconid]=0;
	for(new i=0; i<MAX_PLAYERS; i++)
	Show[i][iconid]=0;
	return 1;
}

stock ResetMapIconVariables(playerid)
{
	for(new i=0; i<MAX_ICONS; i++) {
	Show[playerid][i]=1;
	}
	return 1;
}
/*****************************IS*****************************/
stock IsValidMapIcon(iconid)
{
	if (IsValid[iconid] == 1) return 1;
	return 0;
}


stock IsIconActivatedForPlayer(playerid, iconid)
{
	if (!IsValidMapIcon(icondid)) return 0;
	if (Show[playerid][iconid] == 1) return 1;
	return 0;
}

stock IsIconActivatedForAll(iconid)
{
	if (!IsValidMapIcon(icondid)) return 0;
	for(new i=0; i<MAX_PLAYERS; i++) {
	if (Show[i][iconid] == 1) return 1;
	return 0;
	}
}

/*****************************DO*****************************/
stock SetMapIconPos(iconid, Float:X, Float:Y, Float:Z)
{
	if (!IsValidMapIcon(icondid)) return 0;
	XM[iconid]=X;
	YM[iconid]=Y;
	ZM[iconid]=Z;
	return 1;
}

stock SetMapIconIcon(iconid, markerid, color)
{
	if (!IsValidMapIcon(icondid)) return 0;
	MarkerM[iconid]=markerid;
	ColorM[iconid]=color;
	return 1;
}

stock SetMapIconColor(iconid, color)
{
	if (!IsValidMapIcon(icondid)) return 0;
	ColorM[iconid]=color;
	return 1;
}

stock ShowMapIconForPlayer(playerid, iconid)
{
	if (!IsValidMapIcon(icondid)) return 0;
	Show[playerid][iconid]=1;
	return 1;
}

stock ShowMapIconForAll(iconid)
{
	if (!IsValidMapIcon(icondid)) return 0;
	for(new i=0; i<MAX_PLAYERS; i++)
	if (IsPlayerConnected(i))
	Show[i][iconid]=1;
	return 1;
}

stock ShowAllMapIconForPlayer(playerid)
{
	for(new m=0; m<MAX_ICONS; m++) {
	if (IsValidMapIcon(m))
	Show[playerid][m]=1;
	}
	return 1;
}

stock ShowAllMapIconForAll()
{
	for(new i=0; i<MAX_PLAYERS; i++) {
	if (IsPlayerConnected(i)) {
	for(new m=0; m<MAX_ICONS; m++) {
	if (IsValidMapIcon(m))
	Show[i][m]=1;
	}
	}
	}
	return 1;
}

stock DisableMapIconForPlayer(playerid, iconid)
{
	if (!IsValidMapIcon(icondid)) return 0;
	Show[playerid][iconid]=0;
	return 1;
}

stock DisableMapIconForAll(iconid)
{
	if (!IsValidMapIcon(icondid)) return 0;
	for(new i=0; i<MAX_PLAYERS; i++)
	Show[i][iconid]=0;
	return 1;
}

stock DisableAllMapIconForPlayer(playerid)
{
	for(new m=0; m<MAX_ICONS; m++) {
	if (IsValidMapIcon(m))
	Show[playerid][m]=0;
	}
	return 1;
}

stock DisableAllMapIconForAll()
{
	for(new i=0; i<MAX_PLAYERS; i++) {
	if (IsPlayerConnected(i)) {
	for(new m=0; m<MAX_ICONS; m++) {
	if (IsValidMapIcon(m))
	Show[i][m]=0;
	}
	}
	}
	return 1;
}
/****************************GET*****************************/
stock GetMapIconPos(iconid, &Float:X, &Float:Y, &Float:Z)
{
	if (!IsValidMapIcon(iconid)) return 0;
	X=XM[iconid];
	Y=YM[iconid];
	Z=ZM[iconid];
	return 1;
}

stock GetMapIconIcon(iconid)
{
	if (!IsValidMapIcon(icondid)) return 0;
	return MarkerM[iconid];
}

stock GetMapIconColor(iconid)
{
	if (!IsValidMapIcon(icondid)) return 0;
	return ColorM[inconid];
}
/***************************TIMER*****************************/
public StreamTimer()
{
	for(new i=0; i<MAX_PLAYERS; i++) {
		if (IsPlayerConnected(i)) {
			ShowedForPlayer[i]=0;
			for(new oldm=0; oldm<32; oldm++) {RemovePlayerMapIcon(i, oldm);}
			Count=0;
			for(new m=0; m<MAX_ICONS; m++) {
				if (IsValidMapIcon(m)) {
					if (ShowedForPlayer[i] < MAX_SHOWED_MAPICONS) {
						if (Show[i][m] == 1) {
							if (GetDistanceToMapIcon(i, m) <= 400) {
								SetPlayerMapIcon(i, Count, XM[m], YM[m], ZM[m], MarkerM[m], ColorM[m]);
								ShowedForPlayer[i]++;
								Count++;
							}
						
						}
					}
				}
			}
		}
	}
	return 1;
}
/**************************DISTANCE***************************/
stock GetDistanceToMapIcon(playerid, iconid)
{
	new Float:x1,Float:y1,Float:z1;
	new Float:x2,Float:y2,Float:z2;
	new Float:output;
	GetPlayerPos(playerid, x1, y1, z1);
	GetMapIconPos(iconid, x2, y2, z2);
	output = floatsqroot(floatpower(floatabs(floatsub(x2, x1)), 2)+floatpower(floatabs(floatsub(y2, y1)), 2));
	return floatround(output);
}
Reply
#8

did you put #include <a_samp> under #include <mapicon> ?
Reply
#9

pandabeer Can you please don't answer he's stole my GM

I'm the owner of Zistof and abishanth has stole it from me now he's gave it away and this bastard was a friend of abishanth.
Let him die in his own shit
Reply
#10

Quote:
Originally Posted by stephanenfons
pandabeer Can you please don't answer he's stole my GM

I'm the owner of Zistof and abishanth has stole it from me now he's gave it away and this bastard was a friend of abishanth.
Let him die in his own shit
Report only if you have a evidence.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)