SA-MP Forums Archive
No specific size in enum - 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: No specific size in enum (/showthread.php?tid=615792)



No specific size in enum - JaydenJason - 27.08.2016

I don't quite know how to explain this, but my furniture system has basically a limit now which is set to 1000 by default.

I don't know what could happen but how would I go about removing the limit?


Код:
enum gFurnitureEnum
{
	furnID,
	furnHouse,
	furnExists,
	furnName[64],
	furnModel,
	furnPlaced,
	furnPrice,
	Float:furnPosition[6],
	furnInterior,
	furnVirtual,
	furnObjectID
};
new FurnitureData[MAX_FURNITURE][gFurnitureEnum];
Isn't it something like

Код:
new FurnitureData[][gFurnitureEnum];
I actually have no clue on how to do this


Re: No specific size in enum - Stinged - 27.08.2016

Just increase MAX_FURNITURE when you want to increase the 1000 limit.


Re: No specific size in enum - JaydenJason - 27.08.2016

Quote:
Originally Posted by Stinged
ПоÑмотреть Ñообщение
Just increase MAX_FURNITURE when you want to increase the 1000 limit.
No other way?


Re: No specific size in enum - Shinja - 27.08.2016

Yes you can use it like
PHP код:
new FurnitureData[][gFurnitureEnum]; 
And for usage of it, instead of MAX_FURNITURE you will use sizeof(FurnitureData)


Re: No specific size in enum - Stinged - 27.08.2016

Quote:
Originally Posted by JaydenJason
ПоÑмотреть Ñообщение
No other way?
Nope. If something is dynamic, you can't use []


Re: No specific size in enum - Pottus - 27.08.2016

Quick tip never do this in an enum when you don't have to Float:furnPosition[6] the whole purpose of an enum is to eliminate numerical referencing and encompass related data in a variable subset.