20.01.2015, 17:33
hello im trying to fix the /aselldealership command but getting errors all the time i need help with that.
Error's:
Command:
Thanks in advance.
Error's:
Код:
C:\Users\MetHenk\Desktop\DCRP\DCRP\gamemodes\DCRP.pwn(60578) : error 029: invalid expression, assumed zero C:\Users\MetHenk\Desktop\DCRP\DCRP\gamemodes\DCRP.pwn(60578) : warning 215: expression has no effect C:\Users\MetHenk\Desktop\DCRP\DCRP\gamemodes\DCRP.pwn(60578) : error 001: expected token: ";", but found "]" C:\Users\MetHenk\Desktop\DCRP\DCRP\gamemodes\DCRP.pwn(60578) : error 029: invalid expression, assumed zero C:\Users\MetHenk\Desktop\DCRP\DCRP\gamemodes\DCRP.pwn(60578) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Код:
CMD:aselldealership(playerid, params[]) { if (PlayerInfo[playerid][pAdmin] >= 5) { new playername[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername, sizeof(playername)); new string[128], dealershipid; if(sscanf(params, "d", dealershipid)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /aselldealership [Dealership ID]"); new ip[32]; // new CarDealershipInfo; GetPlayerIp(playerid,ip,sizeof(ip)); format(string,sizeof(string),"Admin %s (IP: %s) has admin-sold Dealership ID %d (was owned by %s).",GetPlayerNameEx(playerid),ip,dealershipid,[dealershipid][cdOwner]); Log("logs/cardealership.log", string); format( CarDealerShipInfo[dealershipid][cdOwner], 128, "Nobody" ); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~You have sold dealership %d.", dealershipid); GameTextForPlayer(playerid, string, 10000, 3); DestroyPickupEx(CarDealerShipInfo[dealershipid][cdPickupID]); CarDealershipInfo[d][cdPickupID] = CreatePickupEx(1239, 1, CarDealershipInfo[d][cdEntranceX], CarDealershipInfo[d][cdEntranceY], CarDealershipInfo[d][cdEntranceZ]); DestroyDynamic3DTextLabel(CarDealerShipInfo[dealershipid][cdTextLabel]); format(text_info, sizeof(text_info),"Car Dealership %s For Sale\nPrice: %d\nRadius: %.1f\nID: %d", CarDealershipInfo[d][cdMessage], CarDealershipInfo[d][cdPrice], CarDealershipInfo[d][cdRadius], d); CarDealershipInfo[d][cdTextLabel] = CreateDynamic3DTextLabel(text_info,COLOR_RED,CarDealershipInfo[d][cdEntranceX], CarDealershipInfo[d][cdEntranceY], CarDealershipInfo[d][cdEntranceZ]+0.75,3.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1); return 1; } else { SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use that command."); } return 1; }