Thread: [Solved] set_lights in cvar
View Single Post
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-30-2020 , 06:23   Re: set_lights in cvar
Reply With Quote #11

PHP Code:
new buffer[size]
get_pcvar_string(cvarbuffercharsmax(buffer))
//do something with buffer 
This is more or less pseudocode, adapt it to your situation. The idea is you do not pass the size of a string manually, you use charsmax() to determine it automatically. This way, you don't pass a wrong value and if you ever change the string size then you do not need to change it in every function that uses it.
__________________

Last edited by HamletEagle; 06-30-2020 at 06:25.
HamletEagle is offline