Problems with stock
#1

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;
}
Reply
#2

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;
}
Reply
#3

So the usage would be like


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

??
Reply
#4

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

Thanks
+rep
Reply
#6

1 error
error 025: function heading differs from prototype
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)