10.07.2011, 09:21
Код:
if(strcmp(cmd, "/buybiz", true) == 0) { if(IsPlayerConnected(playerid)) { new Float:oldposx, Float:oldposy, Float:oldposz; GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerPos(playerid, oldposx, oldposy, oldposz); if(PlayerInfo[playerid][pPbiskey]!= 255) { SendClientMessage(playerid, COLOR_WHITE, " You already own a business, type /sellbiz if you want to buy this one."); return 1; } for(new b = 0; b < sizeof(BizzInfo); b++) { if(IsPlayerInRangeOfPoint(playerid, 2.0, BizzInfo[b][bEntranceX], BizzInfo[b][bEntranceY], BizzInfo[b][bEntranceZ]) && BizzInfo[b][bOwned] == 0) { if(PlayerInfo[playerid][pLevel] < BizzInfo[b][bLevelNeeded]) { format(string, sizeof(string), "You Must Be Level %d To Purchase This",BizzInfo[b][bLevelNeeded]); SendClientMessage(playerid, COLOR_GRAD5, string); return 1; } if(PlayerInfo[playerid][pCash] > BizzInfo[b][bBuyPrice]) { PlayerInfo[playerid][pPbiskey] = b; BizzInfo[b][bOwned] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(BizzInfo[b][bOwner], sendername, 0, strlen(sendername), 255); GivePlayerMoney(playerid,-BizzInfo[b][bBuyPrice]); SetPlayerInterior(playerid,BizzInfo[b][bInterior]); PlayerInfo[playerid][pInt] = BizzInfo[b][bInterior]; SetPlayerPos(playerid,BizzInfo[b][bExitX],BizzInfo[b][bExitY],BizzInfo[b][bExitZ]); GameTextForPlayer(playerid, "~w~Welcome~n~You can exit at any time by moving to this door and typing /exit", 5000, 3); PlayerInfo[playerid][pInt] = BizzInfo[b][bInterior]; PlayerInfo[playerid][pLocal] = b ; SendClientMessage(playerid, COLOR_WHITE, "Congratulations, On Your New Purchase."); SendClientMessage(playerid, COLOR_WHITE, "Type /help to review the new business help section."); OnPropUpdate(); OnPlayerSave(playerid); return 1; } else { SendClientMessage(playerid, COLOR_WHITE, "You don't have the cash for that"); return 1; } } } } return 1; } if(strcmp(cmd, "/sellbiz", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); if(PlayerInfo[playerid][pPbiskey] == 255) { SendClientMessage(playerid, COLOR_WHITE, "You don't own a bizz."); return 1; } //LINE 21403 //LINE 21403 //LINE 21403 //LINE 21403 if(PlayerInfo[playerid][pPbiskey] >= 100 && strcmp(sendername, SBizzInfo[PlayerInfo[playerid][pPbiskey]-100][sbOwner], true) == 0) { new bouse = PlayerInfo[playerid][pPbiskey]-100; PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]+SBizzInfo[bouse][sbTill]; GivePlayerMoney(playerid,SBizzInfo[bouse][sbTill]); SBizzInfo[bouse][sbLocked] = 1; SBizzInfo[bouse][sbOwned] = 0; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(SBizzInfo[bouse][sbOwner], "The State", 0, strlen("The State"), 255); strmid(SBizzInfo[bouse][sbExtortion], "Nobody", 0, strlen("Nobody"), 255); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~Congratulations~n~ You have sold your property for ~n~~g~$%d", SBizzInfo[bouse][sbTill]); GameTextForPlayer(playerid, string, 10000, 3); SBizzInfo[bouse][sbTill] = 0; PlayerInfo[playerid][pPbiskey] = 255; OnPropUpdate(); OnPlayerSave(playerid); return 1; } if(strcmp(sendername, BizzInfo[PlayerInfo[playerid][pPbiskey]][bOwner], true) == 0) { new bouse = PlayerInfo[playerid][pPbiskey]; BizzInfo[bouse][bLocked] = 1; BizzInfo[bouse][bOwned] = 0; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(BizzInfo[bouse][bOwner], "The State", 0, strlen("The State"), 255); strmid(BizzInfo[bouse][bExtortion], "Nobody", 0, strlen("Nobody"), 255); PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]+BizzInfo[bouse][bTill]; GivePlayerMoney(playerid,BizzInfo[bouse][bTill]); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~Congratulations~n~ You have sold your property for ~n~~g~$%d", BizzInfo[bouse][bTill]); GameTextForPlayer(playerid, string, 10000, 3); BizzInfo[bouse][bTill] = 0; PlayerInfo[playerid][pPbiskey] = 255; OnPropUpdate(); OnPlayerSave(playerid); return 1; } else { SendClientMessage(playerid, COLOR_WHITE, "You don't own a business."); } } return 1; }
C:\Users\Kyle\Downloads\GTARP\GTARP\gamemodes\gtar p.pwn(21403) : warning 215: expression has no effect
C:\Users\Kyle\Downloads\GTARP\GTARP\gamemodes\gtar p.pwn(21403) : error 001: expected token: ";", but found "]"
C:\Users\Kyle\Downloads\GTARP\GTARP\gamemodes\gtar p.pwn(21403) : error 029: invalid expression, assumed zero
C:\Users\Kyle\Downloads\GTARP\GTARP\gamemodes\gtar p.pwn(21403) : fatal error 107: too many error messages on one line
Help Please? i know I Need to define somthing, but i dunno how to define in PAWNO?