Pawno crashes while compiling because of one function - 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)
+--- Thread: Pawno crashes while compiling because of one function (
/showthread.php?tid=576581)
Pawno crashes while compiling because of one function -
CaTaLinU - 05.06.2015
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;
}
Re: Pawno crashes while compiling because of one function -
dusk - 05.06.2015
Maybe you have a global variable named "Fishing"?
Re: Pawno crashes while compiling because of one function -
CaTaLinU - 05.06.2015
Definetly not ... but i quit on this thing. Moderators can close this topic.
Re: Pawno crashes while compiling because of one function -
dusk - 05.06.2015
Well one more thing you could try before quitting: try changing the name of the function. It will atleast rule out that.