Passing an array through CallLocalFunction
#3

If value of index 0 (of array) is 0, it will crash the server. A workaround is to store the value of index 0 to a variable and set a value different from 0 to that index. Pass in format "si" with "s" being the array and "i" being the value of the index 0. Last, in the public function assign the old value back (if global array, don't forget to assign the old value to it as well).

EDIT: Something I didn't know about and just figured it out is that the maximum value the array can have (not referring to its size) is 255 (I guess this behavior is related to ASCII) and anything higher than that wraps around so 256 is basically 0, 257 is 1 and so on.
Reply


Messages In This Thread
Passing an array through CallLocalFunction - by dusk - 11.07.2016, 10:06
Re: Passing an array through CallLocalFunction - by PrO.GameR - 11.07.2016, 11:09
Re: Passing an array through CallLocalFunction - by Konstantinos - 11.07.2016, 11:26
Re: Passing an array through CallLocalFunction - by dusk - 11.07.2016, 11:56
Re: Passing an array through CallLocalFunction - by Nero_3D - 11.07.2016, 16:23
Re: Passing an array through CallLocalFunction - by dusk - 11.07.2016, 17:21
Re: Passing an array through CallLocalFunction - by OneDay - 11.07.2016, 17:36

Forum Jump:


Users browsing this thread: 1 Guest(s)