Thread: ...
View Single Post
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-15-2021 , 12:20   Re: ArrayGetString
Reply With Quote #2

This is not how you pass strings around with natives. You have to use get_string and set_string
http://amxmodx.org/api/amxmodx/get_string
http://amxmodx.org/api/amxmodx/set_string

In your case get_string should be what you want. Also MaxClasses is not needed, you can get the current number of classes by using ArraySize(ZombieName).
PHP Code:
ArrayGetString(ZombieNameZombieNameReal[id], Namesizeof(Name)) 
This is also wrong, you should use charsmax for strings, not sizeof. Otherwise, you risk not having space for the null terminator.
__________________

Last edited by HamletEagle; 09-15-2021 at 12:22.
HamletEagle is offline