Pawno crashes while compiling because of one function
#1

I have this function called with SetTimer
if i delete forward and this public, pawno compile with 0 erors, if i add the forward and the publick back in gm the pawno library crashes....

Who can help me ?


Код:
forward Fishing(playerid);
public Fishing(playerid)
{
	new fish = random(3);
	if(fish == 0)
	{
		new cash = random(10000) + 10000;
		new szMessage[1000];
		SendClientMessage(playerid, COLOR_BLUE, "Normal Fish");
		Fishes[playerid][pKG1] = cash;
		format(szMessage, sizeof(szMessage), "Price: $%s!", NumberFormat(cash));
		SendClientMessage(playerid, COLOR_BLUE, szMessage);
		SendClientMessage(playerid, COLOR_WHITE, "Go to 24/7.");
		//format(szMessage, sizeof(szMessage), "* %s caught a common fish that can be sold for about $%s.",GetName(playerid), NumberFormat(cash));
		//nearByMessage(playerid,COLOR_YELLOW,szMessage);
	}
	if(fish == 1)
	{
		new cash = random(20000) + 20000;
		new szMessage[1000];
		SendClientMessage(playerid, COLOR_BLUE, "Rare Fish");
		Fishes[playerid][pKG1] = cash;
		format(szMessage, sizeof(szMessage), "Price: $%s!", NumberFormat(cash));
		SendClientMessage(playerid, COLOR_BLUE, szMessage);
		SendClientMessage(playerid, COLOR_WHITE, "Go to 24/7.");
		//format(szMessage, sizeof(szMessage), "* %s caught a rare fish that can be sold for about $%s.",GetName(playerid), NumberFormat(cash));
		//nearByMessage(playerid,COLOR_YELLOW,szMessage);
	}
	if(fish == 2)
	{
		new cash = random(30000) + 30000;
		new szMessage[1000];
		SendClientMessage(playerid, COLOR_BLUE, "Very rare Fish");
		Fishes[playerid][pKG1] = cash;
		format(szMessage, sizeof(szMessage), "Price: $%s!", NumberFormat(cash));
		SendClientMessage(playerid, COLOR_BLUE, szMessage);
		SendClientMessage(playerid, COLOR_WHITE, "Go to 24/7.");
		//format(szMessage, sizeof(szMessage), "* %s caught a very rare fish that can be sold for about $%s.",GetName(playerid), NumberFormat(cash));
		//nearByMessage(playerid,COLOR_YELLOW,szMessage);
	}
	PlayerInfo[playerid][pFish1] = 1;
	TogglePlayerControllable(playerid, 1);
	return 1;
}
Reply
#2

Maybe you have a global variable named "Fishing"?
Reply
#3

Definetly not ... but i quit on this thing. Moderators can close this topic.
Reply
#4

Well one more thing you could try before quitting: try changing the name of the function. It will atleast rule out that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)