Agneese-Saini / SA-MP

Apache License 2.0
66 stars 118 forks source link

MAX_DIALOG_LIST_ITEMS #16

Closed madarsk closed 6 years ago

madarsk commented 6 years ago

I wanted to have a dialog menu, where I can choose every possible SA:MP skin (312 in total), but the maximum dialog can show is 256. Can I redefine this limit? Will it cause any problems?

IstuntmanI commented 6 years ago

You can safely increase/decrease that limit. It is used just to create arrays to store items in them.

It would be nice to have something like this in the include:

#if !defined MAX_DIALOG_LIST_ITEMS
    #define MAX_DIALOG_LIST_ITEMS 256
#endif

instead of this:

enum
{
    MAX_DIALOG_LIST_ITEMS = 256
};
Agneese-Saini commented 6 years ago

I changed it in the new update. Now you can predefine those constants before inclusion.