That code throw an error " …attempt to index upvalue ‘friendsImage’ (a nil value)…", however if I just put my playerID as “G:123456789” then it fetch my image.
This is the only thing that works…
[lua]
– Working but only fetch one playerPhoto ofcourse…
storyboard.gameNetwork.request( “loadPlayerPhoto”,{ playerID = “G:123456789”, size = “Small”, listener = roomListener})
friendsImage = roomEvent.data.photo
[/lua]
A couple of tests not workning…
[lua]
– Not working, trows the error above.
storyboard.gameNetwork.request( “loadPlayerPhoto”,{ playerID = storyboard.friendsArray[row.index].playerID, size = “Small”, listener = roomListener})
– Added the “s” to playerID, not working.
storyboard.gameNetwork.request( “loadPlayerPhoto”,{ playerIDs = storyboard.friendsArray[row.index].playerID, size = “Small”, listener = roomListener})
– wrapped in a table, not working
storyboard.gameNetwork.request( “loadPlayerPhoto”,{ playerID = {storyboard.friendsArray[row.index].playerID}, size = “Small”, listener = roomListener})
– Added the “s” to playerID and wrapped in a table, not working.
storyboard.gameNetwork.request( “loadPlayerPhoto”,{ playerIDs = {storyboard.friendsArray[row.index].playerID}, size = “Small”, listener = roomListener})
– tostring() just for test, not working
storyboard.gameNetwork.request( “loadPlayerPhoto”,{ playerID = tostring(storyboard.friendsArray[row.index].playerID), size = “Small”, listener = roomListener})
– tostring() just for test, wrapped in a table, not working.
storyboard.gameNetwork.request( “loadPlayerPhoto”,{ playerID = {tostring(storyboard.friendsArray[row.index].playerID)}, size = “Small”, listener = roomListener})
– tostring() just for test, added “s” to playerID, not working
storyboard.gameNetwork.request( “loadPlayerPhoto”,{ playerIDs = tostring(storyboard.friendsArray[row.index].playerID), size = “Small”, listener = roomListener})
– tostring() just for test, added “s” to playerID, wrapped in a table, not working.
storyboard.gameNetwork.request( “loadPlayerPhoto”,{ playerIDs = {tostring(storyboard.friendsArray[row.index].playerID)}, size = “Small”, listener = roomListener})
[/lua]
I have tried this way to with all of the above tests and not working…
[lua]
for i = 1, #storyboard.friendsArray, 1 do
storyboard.gameNetwork.request( “loadPlayerPhoto”,{ playerID = storyboard.friendsArray[row.index].playerID, size = “Small”, listener = roomListener})
end
[/lua]
And I have tried with everything above…
[lua]
– not working
friendsImage = roomEvent.data[row.index].photo
– not working
friendsImage = roomEvent.data.photo
[/lua]
I can’t think of any more ways to try getting their photos?!?!?!