SA-MP Forums Archive
Bizz Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Bizz Help (/showthread.php?tid=434430)



Bizz Help - Kenway - 02.05.2013

I dont know what to do

Eror:
Код:
(18559 -- 18562) : warning 213: tag mismatch
(18559 -- 18613) : error 029: invalid expression, assumed zero
(18559 -- 18613) : error 001: expected token: ",", but found ";"
Код:
LoadBizz() {

	if(!fexist("bizz.cfg")) return 1;

	new
		szFileStr[1024],
		File: iFileHandle = fopen("bizz.cfg", io_read),
		iIndex;

	while(iIndex < sizeof(BizzInfo) && fread(iFileHandle, szFileStr)) {
		sscanf(szFileStr, "p<|>iiis[128]s[24]ffffffffiiiiiiiiiiiiiiiiiff", // There start the problem
			BizzInfo[iIndex][bOwned],
			BizzInfo[iIndex][bOwner],
			BizzInfo[iIndex][bTextID],
			BizzInfo[iIndex][bPickupID],
			BizzInfo[iIndex][bInteriorVW],
			BizzInfo[iIndex][bInteriorInt],
			BizzInfo[iIndex][bExteriorVW],
			BizzInfo[iIndex][bExteriorInt],
			BizzInfo[iIndex][bExtortion],
			BizzInfo[iIndex][bExteriorX],
			BizzInfo[iIndex][bExteriorY],
			BizzInfo[iIndex][bExteriorZ],
			BizzInfo[iIndex][bExteriorR],
			BizzInfo[iIndex][bInteriorX],
			BizzInfo[iIndex][bInteriorY],
			BizzInfo[iIndex][bInteriorZ],
			BizzInfo[iIndex][bInteriorR],
			BizzInfo[iIndex][bLevel],
			BizzInfo[iIndex][bBuyPrice],
			BizzInfo[iIndex][bEntranceCost],
			BizzInfo[iIndex][bSafeMoney],
			BizzInfo[iIndex][bTill],
			BizzInfo[iIndex][bLocked],
			BizzInfo[iIndex][bProducts],
			BizzInfo[iIndex][bDelivProd],
			BizzInfo[iIndex][bType],
			BizzInfo[iIndex][BusinessProdPrice],
			BizzInfo[iIndex][BusinessPrice],
			BizzInfo[iIndex][bPickupModel],
			BizzInfo[iIndex][BusinessFee],
			BizzInfo[iIndex][BusinessProducts],
			BizzInfo[iIndex][bPriceProd],
			BizzInfo[iIndex][bMaxProducts],
			BizzInfo[iIndex][bProductPrice][0],
			BizzInfo[iIndex][bProductPrice][1],
			BizzInfo[iIndex][bProductPrice][2],
			BizzInfo[iIndex][bProductPrice][3],
			BizzInfo[iIndex][bProductPrice][4],
			BizzInfo[iIndex][bProductPrice][5],
			BizzInfo[iIndex][bProductPrice][6],
			BizzInfo[iIndex][bProductPrice][7],
			BizzInfo[iIndex][bProductPrice][8],
			BizzInfo[iIndex][bProductPrice][9],
			BizzInfo[iIndex][bProductPrice][10],
			BizzInfo[iIndex][bProductPrice][11],
			BizzInfo[iIndex][bProductPrice][12],
			BizzInfo[iIndex][bProductPrice][13],
			BizzInfo[iIndex][bProductPrice][14],
			BizzInfo[iIndex][bProductPrice][15],
			BizzInfo[iIndex][bProductPrice][16],
			BizzInfo[iIndex][bProductPrice][17],
			BizzInfo[iIndex][bProductPrice][18],
			BizzInfo[iIndex][bProductPrice][19],
		);

		if(BizzInfo[iIndex][bOwned]) {
			format(szFileStr, sizeof(szFileStr), "%s\n\n\nOwner: %s\nType: %s\nEntrance Fee: %s\nID: %d",BizzInfo[iIndex][bLocked],BizzInfo[iIndex][bOwner],BizzInfo[iIndex][bType],BizzInfo[iIndex][bEntranceCost],iIndex);

		}
		else format(szFileStr, sizeof(szFileStr), "This business is\n for sale!\nCost: $%d\nType: %s\nLevel: %d\nID: %d\nTo buy this business type /buybizz",BizzInfo[iIndex][bBuyPrice],BizzInfo[iIndex][bType],BizzInfo[iIndex][bLevelNeeded],iIndex);

		CreateBusiness(iIndex)
		BizzInfo[iIndex][bTextID] = CreateDynamic3DTextLabel(szFileStr, COLOR_GREEN, BizzInfo[iIndex][bExteriorX], BizzInfo[iIndex][bExteriorY], BizzInfo[iIndex][bExteriorZ]+0.5,30.0, .testlos = 1, .streamdistance = 30.0);
		++iIndex;
	}
	return fclose(iFileHandle);
}



Re: Bizz Help - Yashas - 02.05.2013

Can you please point out on which line the error is.
Thanks


Re: Bizz Help - Kenway - 02.05.2013

The erors line is 18459 -- 18564


Re: Bizz Help - CJay9209 - 02.05.2013

Lol which lines are the numbers your referring to? You've given us the numbers but which lines are they in the code you posted.


Re: Bizz Help - RaZzZzoR - 02.05.2013

Код:
LoadBizz() {

	if(!fexist("bizz.cfg")) return 1;

	new
		szFileStr[1024],
		File: iFileHandle = fopen("bizz.cfg", io_read),
		iIndex;

	while(iIndex < sizeof(BizzInfo) && fread(iFileHandle, szFileStr)) {
		sscanf(szFileStr, "p<|>iiis[128]s[24]ffffffffiiiiiiiiiiiiiiiiiff",
			BizzInfo[iIndex][bOwned],
			BizzInfo[iIndex][bOwner],
			BizzInfo[iIndex][bTextID],
			BizzInfo[iIndex][bPickupID],
			BizzInfo[iIndex][bInteriorVW],
			BizzInfo[iIndex][bInteriorInt],
			BizzInfo[iIndex][bExteriorVW],
			BizzInfo[iIndex][bExteriorInt],
			BizzInfo[iIndex][bExtortion],
			BizzInfo[iIndex][bExteriorX],
			BizzInfo[iIndex][bExteriorY],
			BizzInfo[iIndex][bExteriorZ],
			BizzInfo[iIndex][bExteriorR],
			BizzInfo[iIndex][bInteriorX],
			BizzInfo[iIndex][bInteriorY],
			BizzInfo[iIndex][bInteriorZ],
			BizzInfo[iIndex][bInteriorR],
			BizzInfo[iIndex][bLevel],
			BizzInfo[iIndex][bBuyPrice],
			BizzInfo[iIndex][bEntranceCost],
			BizzInfo[iIndex][bSafeMoney],
			BizzInfo[iIndex][bTill],
			BizzInfo[iIndex][bLocked],
			BizzInfo[iIndex][bProducts],
			BizzInfo[iIndex][bDelivProd],
			BizzInfo[iIndex][bType],
			BizzInfo[iIndex][BusinessProdPrice],
			BizzInfo[iIndex][BusinessPrice],
			BizzInfo[iIndex][bPickupModel],
			BizzInfo[iIndex][BusinessFee],
			BizzInfo[iIndex][BusinessProducts],
			BizzInfo[iIndex][bPriceProd],
			BizzInfo[iIndex][bMaxProducts],
			BizzInfo[iIndex][bProductPrice][0],
			BizzInfo[iIndex][bProductPrice][1],
			BizzInfo[iIndex][bProductPrice][2],
			BizzInfo[iIndex][bProductPrice][3],
			BizzInfo[iIndex][bProductPrice][4],
			BizzInfo[iIndex][bProductPrice][5],
			BizzInfo[iIndex][bProductPrice][6],
			BizzInfo[iIndex][bProductPrice][7],
			BizzInfo[iIndex][bProductPrice][8],
			BizzInfo[iIndex][bProductPrice][9],
			BizzInfo[iIndex][bProductPrice][10],
			BizzInfo[iIndex][bProductPrice][11],
			BizzInfo[iIndex][bProductPrice][12],
			BizzInfo[iIndex][bProductPrice][13],
			BizzInfo[iIndex][bProductPrice][14],
			BizzInfo[iIndex][bProductPrice][15],
			BizzInfo[iIndex][bProductPrice][16],
			BizzInfo[iIndex][bProductPrice][17],
			BizzInfo[iIndex][bProductPrice][18],
			BizzInfo[iIndex][bProductPrice][19]
		);

		if(BizzInfo[iIndex][bOwned]) {
			format(szFileStr, sizeof(szFileStr), "%s\n\n\nOwner: %s\nType: %s\nEntrance Fee: %s\nID: %d",BizzInfo[iIndex][bLocked],BizzInfo[iIndex][bOwner],BizzInfo[iIndex][bType],BizzInfo[iIndex][bEntranceCost],iIndex);

		}
		else format(szFileStr, sizeof(szFileStr), "This business is\n for sale!\nCost: $%d\nType: %s\nLevel: %d\nID: %d\nTo buy this business type /buybizz",BizzInfo[iIndex][bBuyPrice],BizzInfo[iIndex][bType],BizzInfo[iIndex][bLevelNeeded],iIndex);

		CreateBusiness(iIndex)
		BizzInfo[iIndex][bTextID] = CreateDynamic3DTextLabel(szFileStr, COLOR_GREEN, BizzInfo[iIndex][bExteriorX], BizzInfo[iIndex][bExteriorY], BizzInfo[iIndex][bExteriorZ]+0.5,30.0, .testlos = 1, .streamdistance = 30.0);
		++iIndex;
	}
	return fclose(iFileHandle);
}



Re: Bizz Help - Yashas - 02.05.2013

Quote:
Originally Posted by CJay9209
Посмотреть сообщение
Lol which lines are the numbers your referring to? You've given us the numbers but which lines are they in the code you posted.
EDIT:I was abt to tell the same


Re: Bizz Help - Kenway - 02.05.2013

Well from 3 to 20


Re: Bizz Help - Yashas - 02.05.2013

The error must be at CreateDynamic3DText , you are not supposed to write streamdistance = 100.0 instead just 100.0 will work.


Re: Bizz Help - Yashas - 02.05.2013

Quote:
Originally Posted by Yashas
Посмотреть сообщение
The error must be at CreateDynamic3DText , you are not supposed to write streamdistance = 100.0 instead just 100.0 will work.
Did you try this??


Re: Bizz Help - Kenway - 02.05.2013

Quote:
Originally Posted by Yashas
Посмотреть сообщение
Did you try this??
Yes same think