26.01.2016, 14:32
%s, %i, %d and %f are only used while formatting strings.
They are placeholders for the contents of variables, which aren't in place as well.
They can't be used with if-instructions, so no reason to add them.
You must replace the "%s" with the variablenames themselves.
Example:
They are placeholders for the contents of variables, which aren't in place as well.
They can't be used with if-instructions, so no reason to add them.
You must replace the "%s" with the variablenames themselves.
Example:
PHP код:
new CurrentBet = 50;
new Message[144];
format(Message, sizeof(Message), "Invalid amount specified, you need values between %d and %d", PlayerTemp[playerid][minbet], PlayerTemp[playerid][maxbet]);
if(PlayerTemp[playerid][minbet] < CurrentBet || PlayerTemp[playerid][maxbet] > CurrentBet) return SendClientError(playerid, Message);

