15.10.2016, 23:02
After the little bit of help I got last night, I decided to make this stock function to speed up the development process, and this is the issue I am running into with it.
Error the compiler outputs:
The stock function:
Error the compiler outputs:
Код:
C:\Users\mace\Desktop\Code Related Folders\Untitled Trucking Server\gamemodes\MTruck.pwn(1878) : error 029: invalid expression, assumed zero
Код:
stock ChooseMissionRewardOffJobNumber(playerid) { new string[144], string2[144], reward; switch(aTMInfo[][mission_number]) // This is the issue. { case 0: { reward = randomEx(950, 1250); GivePlayerMoney(playerid, reward); format(string, sizeof(string), "%s: Thanks for moving that freight. Good job.", aTMInfo[0][mission_actor_name], reward); format(string2, sizeof(string2), "%s(%d) Has moved some frieght for Steve earning a grand total of $%d.", PlayerName(playerid), playerid, reward); SendMessage(playerid, -1, string); SendMessageToAll(-1, string2); } case 1: { reward = randomEx(1000, 1500); GivePlayerMoney(playerid, reward); format(string, sizeof(string), "%s: You finished just in time. Good job!", aTMInfo[0][mission_actor_name], reward); format(string2, sizeof(string2), "%s(%d) has finished working for Ian in Doherty earning a cool $%d.", PlayerName(playerid), playerid, reward); SendMessage(playerid, -1, string); SendMessageToAll(-1, string2); } } return 1; }