i am tryiing to get the room ids of the rooms that i created on the console to display as gui in my game. by default the listener script on calling the function ongetallroomsdone() displays the room ids as log using the code:-
Log ("onGetAllRoomsDone : " + eventObj.getResult());
for(int i=0; i< eventObj.getRoomIds().Length; ++i)
{
Log ("Room ID : " + eventObj.getRoomIds()[i]);
}
in order to display the list as GUI in my game i decided to create a string array k and assign the room ids to it in the loop and then display it.but when i make the following changes it stops after displaying the first room id in the log and the debug.log i put .please help!
public String[] k;
public void Start()
{
k=new string[20];
}
public void onGetAllRoomsDone (AllRoomsEvent eventObj)
{
Log ("onGetAllRoomsDone : " + eventObj.getResult());
for(int i=0; i< eventObj.getRoomIds().Length; ++i)
{
Log ("Room ID : " + eventObj.getRoomIds()[i]);
k[i-1]=eventObj.getRoomIds()[i];
}
}