SA-MP Forums Archive
Fatal error !! :( - 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 !! :( (/showthread.php?tid=147411)



Fatal error !! :( - traficgamesro - 12.05.2010

I have an error ! please help


D:\Games\Tgz.pwn(15) : fatal error 100: cannot read from file: "pcash"

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


1 Error.



Re: Fatal error !! :( - theRealG - 12.05.2010

You can literally read the error as it displays.


Re: Fatal error !! :( - traficgamesro - 12.05.2010

in include i dont have pcash ! can give me "pcash"?


Re: Fatal error !! :( - ray187 - 12.05.2010

http://forum.sa-mp.com/index.php?topic=62744.0

Use search next time.


Re: Fatal error !! :( - traficgamesro - 12.05.2010

i put the pcash in Server / includer and in pawno/includees and doesent work...


Re: Fatal error !! :( - ray187 - 12.05.2010

What about figuring out what's wrong then?


Re: Fatal error !! :( - traficgamesro - 12.05.2010

i can't compile the pwn , he don;t work ....
Код:
#include <a_samp>
#include <pcash>

#define FILTERSCRIPT
#if defined FILTERSCRIPT

#define red 0xFF0000AA
#define green 0x33FF33AA

public OnFilterScriptInit()
{
	print("--------------------------------------");
	print(" Simple PCash test and example script ");
	print("--------------------------------------");
	return 1;
}

#endif

public OnPlayerConnect(playerid)
{
	ResetPlayerPCash(playerid);
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	new cmd[256], idx;
	cmd = strtok(cmdtext, idx);
	
	if(strcmp("/GivePCash", cmd, true) == 0)
	{
		new tmp[256];
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp)) return SendClientMessage(playerid, red, "You did not give an ID or ammount");
		if(strval(tmp) == playerid) return SendClientMessage(playerid, red, "You can not give yourself PCash");
		if(IsPlayerConnected(strval(tmp)) == 0) return SendClientMessage(playerid, red, "That player is not connected");

		new tmp2[256];
		tmp2 = strtok(cmdtext, idx);
		if(!strlen(tmp2)) return SendClientMessage(playerid, red, "You did not give an ammount");

		new player = strval(tmp);
		new ammount = strval(tmp2);

		if(GetPlayerPCash(playerid) < ammount) return SendClientMessage(playerid, red, "You do not have enough PCash");

		new pname[MAX_PLAYER_NAME];
		GetPlayerName(player, pname, sizeof(pname));

		new oname[MAX_PLAYER_NAME];
		GetPlayerName(playerid, oname, sizeof(oname));

		new string[256];
		format(string, sizeof(string), "You have given %s %d PCash", pname, ammount);
		SendClientMessage(playerid, green, string);

		format(string, sizeof(string), "You have been given %d PCash by %s", ammount, oname);
		SendClientMessage(player, green, string);

		GivePlayerPCash(player, ammount);
		GivePlayerPCash(playerid, -ammount);
		return 1;
	}

	if(strcmp("/ConvertPCash", cmd, true) == 0)
	{
		new tmp[256];
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp)) return SendClientMessage(playerid, red, "You did not give an ammount");

		new ammount = strval(tmp);

		if(GetPlayerPCash(playerid) < ammount) return SendClientMessage(playerid, red, "You do not have enough PCash");

		new string[256];
		format(string, sizeof(string), "You have converted %d PCash", ammount);
		SendClientMessage(playerid, green, string);

		GivePlayerPCash(playerid, -ammount);
		GivePlayerMoney(playerid, ammount);
		return 1;
	}
	
	if (strcmp("/MyPCash", cmdtext, true) == 0)
	{
		new string[256];
		format(string, sizeof(string), "PCash: %d", GetPlayerPCash(playerid));
		SendClientMessage(playerid, green, string);
		return 1;
	}
	
	if(strcmp("/GiveMePCash", cmdtext, true) == 0)
	{
		if(IsPlayerAdmin(playerid) == 0) return SendClientMessage(playerid, red, "You are not an admin");
		
		GivePlayerPCash(playerid, 1000);
		
		SendClientMessage(playerid, green, "You got 1000 PCash");
		return 1;
	}
	return 0;
}

strtok(const string[], &index)
{
	new length = strlen(string);
	while ((index < length) && (string[index] <= ' '))
	{
		index++;
	}

	new offset = index;
	new result[20];
	while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = string[index];
		index++;
	}
	result[index - offset] = EOS;
	return result;
}



Re: Fatal error !! :( - ray187 - 12.05.2010

Try to figure out what the errors displaying could mean and come up with a solution by yourself before you continue posting


Re: Fatal error !! :( - traficgamesro - 12.05.2010

i can't make to work ..... i don't know how make him .... the include PCash ! is not work !


Re: Fatal error !! :( - traficgamesro - 12.05.2010

please give me a god pcash include !!!!!!