SA-MP Forums Archive
Problems with stock - 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: Problems with stock (/showthread.php?tid=430753)



Problems with stock - Squirrel - 15.04.2013

Alright so I made this stock, now I wanna use it. But i dont udnerstand one thing, how can I use it now? I mean I have these errors and now I want to use for example:

Код:
return Errors(case0);
How to do that?

or like
Код:
Errors(NoMoney);
Код:
stock Errors(playerid)
{
	case 0:
	{
	    if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, COLOR_RED, "<!>No money!");
	}
	case 1:
	{
	    if(GetPlayerWeapon(playerid) = 0) return SendClientMessage(playerid, COLOR_RED, "<!>No gun!");
	}
	return 1;
}



Re : Problems with stock - DaTa[X] - 15.04.2013

pawn Код:
stock Errors(playerid,Errorid)
{
         if(Errorid == 0) return SendClientMessage(playerid,red,"ERROR id 0");
        if(Errorid == 1) return SendClientMessage(playerid,red,"ERROR id 1");
    return 1;
}



Re: Problems with stock - Squirrel - 15.04.2013

So the usage would be like


Код:
return Errors(playerid, 0)
// example

??


Re : Re: Problems with stock - DaTa[X] - 15.04.2013

Quote:
Originally Posted by Squirrel
Посмотреть сообщение
So the usage would be like
Код:
return Errors(playerid, 0)
// example
yes like that


Re: Problems with stock - Squirrel - 15.04.2013

Thanks
+rep


Re: Problems with stock - Squirrel - 15.04.2013

1 error
error 025: function heading differs from prototype