Arrays and commandToClient
by Kaare Christensen · in Technical Issues · 07/23/2003 (3:09 am) · 4 replies
Hi,
is it possible to send an array from the server to the client, with for example commandToClient().
I've tried the following, but the array ends up as a empty string on the client side.
Is there another way to do this?
//Kaare
is it possible to send an array from the server to the client, with for example commandToClient().
I've tried the following, but the array ends up as a empty string on the client side.
%myArray[0] = "ab"; %myArray[1] = "cd"; commandToClient(%this, 'someFunction', %myArray);
Is there another way to do this?
//Kaare
#2
A SimSet would be passed just as an ID, which won't really get you anywhere.
07/23/2003 (10:18 am)
You'll just have to send all the items in the array either as parameters or as seperate commands.A SimSet would be passed just as an ID, which won't really get you anywhere.
#3
I solved the problem by converting the array into a string first, then send the string and then after the transfer seperate the string again.
Ugly, but works :)
//Kaare
07/23/2003 (11:59 am)
Thanks for your replys.I solved the problem by converting the array into a string first, then send the string and then after the transfer seperate the string again.
Ugly, but works :)
//Kaare
Associate Ian Omroth Hardingham
Mode 7 Games
The array support in script is pretty bad. SimSets may do what you want.
Ian