SA-MP Forums Archive
Fatal error 100: cannot read from file: "utils" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Fatal error 100: cannot read from file: "utils" (/showthread.php?tid=126355)



Fatal error 100: cannot read from file: "utils" - MahmutBey - 08.02.2010


Hail Guys,

I get error all game-mode.

Im not debug this error..



Код:
C:\DOCUME~1\ADMINI~1\Desktop\GTARP\GAMEMO~1\gtarp.pwn(16) : fatal error 100: cannot read from file: "utils"

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


1 Error.

../pawno/includes/utils.inc
Код:
IsNumeric(const string[])
{
	for (new i = 0, j = strlen(string); i < j; i++)
	{
		if (string[i] > '9' || string[i] < '0') return 0;
	}
	return 1;
}

ReturnUser(text[], playerid = INVALID_PLAYER_ID)
{
	new pos = 0;
	while (text[pos] < 0x21) // Strip out leading spaces
	{
		if (text[pos] == 0) return INVALID_PLAYER_ID; // No passed text
		pos++;
	}
	new userid = INVALID_PLAYER_ID;
	if (IsNumeric(text[pos])) // Check whole passed string
	{
		// If they have a numeric name you have a problem (although names are checked on id failure)
		userid = strval(text[pos]);
		if (userid >=0 && userid < MAX_PLAYERS)
		{
			if(!IsPlayerConnected(userid))
			{
				/*if (playerid != INVALID_PLAYER_ID)
				{
					SendClientMessage(playerid, 0xFF0000AA, "User not connected");
				}*/
				userid = INVALID_PLAYER_ID;
			}
			else
			{
				return userid; // A player was found
			}
		}
		/*else
		{
			if (playerid != INVALID_PLAYER_ID)
			{
				SendClientMessage(playerid, 0xFF0000AA, "Invalid user ID");
			}
			userid = INVALID_PLAYER_ID;
		}
		return userid;*/
		// Removed for fallthrough code
	}
	// They entered [part of] a name or the id search failed (check names just incase)
	new len = strlen(text[pos]);
	new count = 0;
	new name[MAX_PLAYER_NAME];
	for (new i = 0; i < MAX_PLAYERS; i++)
	{
		if (IsPlayerConnected(i))
		{
			GetPlayerName(i, name, sizeof (name));
			if (strcmp(name, text[pos], true, len) == 0) // Check segment of name
			{
				if (len == strlen(name)) // Exact match
				{
					return i; // Return the exact player on an exact match
					// Otherwise if there are two players:
					// Me and MeYou any time you entered Me it would find both
					// And never be able to return just Me's id
				}
				else // Partial match
				{
					count++;
					userid = i;
				}
			}
		}
	}
	if (count != 1)
	{
		if (playerid != INVALID_PLAYER_ID)
		{
			if (count)
			{
				SendClientMessage(playerid, 0xFF0000AA, "Multiple users found, please narrow earch");
			}
			else
			{
				SendClientMessage(playerid, 0xFF0000AA, "No matching user found");
			}
		}
		userid = INVALID_PLAYER_ID;
	}
	return userid; // INVALID_USER_ID for bad return
}



Re: Fatal error 100: cannot read from file: "utils" - [LSR]State_Trooper - 08.02.2010

Get the Utils include that will fix it


Re: Fatal error 100: cannot read from file: "utils" - MahmutBey - 08.02.2010

I have already Util include...


Re: Fatal error 100: cannot read from file: "utils" - ettans - 08.02.2010

Are you sure you included it properly? Is it in the correct folder?
Also, you should have posted this in the scripting discussion.


Re: Fatal error 100: cannot read from file: "utils" - MahmutBey - 08.02.2010

Yes, this is in correct folder.. (../pawno/includes/utils.inc )

But, yet don't work.. So I want help


Re: Fatal error 100: cannot read from file: "utils" - [LSR]State_Trooper - 08.02.2010

Lol, What you need to do is goto the folder where you put the include, and open the pawno.exe in that folder and compile it.


Re: Fatal error 100: cannot read from file: "utils" - MahmutBey - 08.02.2010

Jajaja, sorry guys.

I did't know. I debugg


Re: Fatal error 100: cannot read from file: "utils" - [LSR]State_Trooper - 08.02.2010

Work?



Re: Fatal error 100: cannot read from file: "utils" - Flake. - 08.02.2010

wrong section xD

make sure you have #include <utils> in your gamemode/filterscript


Re: Fatal error 100: cannot read from file: "utils" - MaykoX - 08.02.2010

Quote:
Originally Posted by (*|Flake|*)
wrong section xD

make sure you have #include <utils> in your gamemode/filterscript
lol he have it there otherways there wont be this error. If he remove it he will probobly get 20 errors +

Make sure that you run Pawno from there where you puted utils..