alliedmodders / amxmodx

AMX Mod X - Half-Life 1 Scripting and Administration
http://www.amxmodx.org/
494 stars 197 forks source link

[Feature Request] Increase length of description field in create_cvar #727

Open twisterniq opened 5 years ago

twisterniq commented 5 years ago

Title. The length limit in the description field of create_cvar native is too small.

Arkshine commented 5 years ago

There is no defined limit for such native, but the string retrieval relies on the static AMXX buffer. Currently in version 1.9, this buffer length is set to 16kb, which is quite a lot.

Can you show an example? It seems odd you need that much size for a single cvar description.

twisterniq commented 5 years ago

Sure, here is what I see in the configuration file:

image

The description is taken from a lang file:

SHOP_CVAR_REFLECTION_DAMAGE_ITEMFLAGS = Флаги для регистрации предмета^na - без флагов^nb - только для живых^nc - только для мёртвых^nd - только для контр-террористов^ne - только для террористов^nf - только для наблюдателей

It doesn't show it completely. I generate the configuration file with AutoExecConfig() native. AMXX 1.10.5257.

serfreeman1337 commented 5 years ago

Actually it's limited in the config generation: https://github.com/alliedmodders/amxmodx/blob/975d8778005842efb0a2729f09017c359176f58d/amxmodx/CoreConfig.cpp#L184