Need help with Business CMD
#1

Hey,
I'm helping my mate with some scripting on his GM. And I keep getting these error's..

C:\Users\******\HSRPbeta.pwn(33967) : error 010: invalid function or declaration
C:\Users\******\HSRPbeta.pwn(88685) : error 017: undefined symbol "BizInfo"
C:\Users\******\HSRPbeta.pwn(88685) : warning 215: expression has no effect
C:\Users\******\HSRPbeta.pwn(88685) : error 001: expected token: ";", but found "]"
C:\Users\******\HSRPbeta.pwn(88685) : error 029: invalid expression, assumed zero
C:\Users\******\HSRPbeta.pwn(88685) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.

Код:
CMD:createbiz(playerid, params[])
{
	new type, string[128];
	if(PlayerInfo[playerid][pAdmin] < 99999) return SendClientMessage(playerid, COLOR_GREY, "You are not an authorized to use this command.");
	if(sscanf(params, "i", type))
	{
		SendClientMessage(playerid, COLOR_WHITE, "USAGE: /createbiz [type]");
        SendClientMessage(playerid, COLOR_GREY, "TYPES: 1) 24/7 | 2) Clothes Shop | 3) Ammunation | 4) Club");
		SendClientMessage(playerid, COLOR_GREY,	"TYPES: | 5) Advertisement Agency | 6) Fast Food");
		return 1;
	}
	if(type < 1 || type > 6) return SendClientMessage(playerid, COLOR_GREY, "Businesses are between 1 and 5.");
	for(new idx=1; idx<MAX_BIZ; idx++)
	{
	    if(!BizInfo[idx][bType];
		{
		    // Getting Business Setup
		    new Float:X, Float:Y, Float:Z);
		    GetPlayerPos(playerid, X, Y, Z);
		    // Making Business
		    BizInfo[idx][bType] = type;
		    format(BizInfo[idx][bOwner], 32, "The State");
		    BizInfo[idx][bX] = X;
		    BizInfo[idx][bY] = Y;
		    BizInfo[idx][bZ] = Z;
		    BizInfo[idx][bMoney] = 0;
		    BizInfo[idx][bProducts] = 0;
		    BizInfo[idx][bSold] = 0;
		    BizInfo[idx][bLevel] = 1;
		    BizInfo[idx][bPrice] = 5000000;
		    BizInfo[PlayerInfo[playerid][pBiz]][bStatus] = 1;
			BizInfo[idx][bPickup] = CreateDynamicPickup(1272, 1, X, Y, Z, 0);
			format(string, sizeof(string), "ID: %d\n%s\nOwner: %s\nStatus: For Sale\nPrice: $%d", idx, RBT(idx), BizInfo[idx][bOwner], BizInfo[idx][bPrice]);
			BizInfo[idx][bText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, X, Y, Z, 15);
			format(string, sizeof(string), "AdmWarn: %s has created business ID %d.", RPN(playerid), idx);
			ABroadCast(COLOR_DARKRED, string, 2 );
			SaveBiz();
			idx = MAX_BIZ;
		}
	}
	return 1;
}
Any help, is greatly accepted.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)