27.09.2017, 07:18
Ok so i encountered this problem a-lot of times already, and i always find a way to fix it, but i have a new problem i cant solve. so i made this "/robbiz" thing for my roleplay server. the Compiler shows at the bottom: gamemode.pwn has been compiled to gamemode.amx, and the compiler output doesnt show a single message, and the gamemode file is 0KB, so i know that there is a problem. This code is the problem, removing it makes the compilation succeed. But i need help cause i know that there is no problem in this code.
Код:
if(strcmp(cmd, "/robbiz", true) == 0) { if(IsPlayerConnected(playerid)) { new WeaponName[65]; new string[256]; new bizid = PlayerInfo[playerid][InBusiness]; if(PlayerInfo[playerid][InBusiness] <= 0) { SendClientMessage(playerid, COLOR_GREY, " You are not inside a Business!"); return 1; } if(BizzInfo[id][bTill] <= 0) { SendClientMessage(playerid, COLOR_GREY, " There Is Nothing To Rob!"); return 1; } //new BizRobber = GetPlayerId(PlayerName(playerid)); //new abc123 = BizzInfo[id][bTill]*50/100; new RobberyAmount = Random(1, BizzInfo[id][bTill]); SetTimer("RobTimer", 10000, 0);//BizzInfo[id][bTill] += cashdeposit; format(string, sizeof(string), "------------------------------------------------------"); SendClientMessage(playerid, COLOR_RED, string); format(string, sizeof(string), "{FFFFFF}%s has successfully robbed the store and got %d!",PlayerName(playerid),); SendClientMessage(playerid, COLOR_GREY, string); format(string, sizeof(string), "------------------------------------------------------"); SendClientMessage(playerid, COLOR_RED, string); PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]+RobberyAmount; GivePlayerMoney(playerid,RobberyAmount); BizzInfo[id][bTill] -= RobberyAmount; //BizzInfo[id][bTill] -= abc123; //bugged :( Need help ith this //if(PlayerInfo[playerid][pMember] == 1)//BizzInfo[id]// PlayerInfo[playerid][Robbing] = 0;BizzInfo[PlayerInfo[playerid][InBusiness]][bProductPrice2] //{ // format(string, sizeof(string), "Business Number %d is being robbed, we need units at the area.",PlayerInfo[BizRobber][BizzInfo[id][bTill]]); // SendRadioMessage(1, TEAM_BLUE_COLOR, string); //} } } return 1; }