[r169] Multiplayer: getListRoomAt tries to return nul;

Bugs will be moved here once resolved.

Post » Sat May 10, 2014 1:51 am

Problem Description
Coding error

Attach a Capx
function getListRoomAt(roomList, i)
{
if (!roomList)
return null;

i = Math.floor(i);

if (i < 0 || i >= roomList.length)
return nul; <------------------------------------

return roomList[i];
};

Description of Capx


Steps to Reproduce Bug
  • Call Multiplayer.ListRoomName with a bad index

Observed Result
I ended up getting an empty list (which may be another issue), and accidentally passed a bad index (-1). Game crashed referencing the bad "nul" line.

Expected Result
return null;

Affected Browsers
  • Chrome: (YES/NO)
  • FireFox: (YES/NO)
  • Internet Explorer: (YES/NO)

Operating System and Service Pack
N/A

Construct 2 Version ID
169
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Mon May 12, 2014 3:35 pm

Thanks, fixed for next build.
Scirra Founder
B
397
S
236
G
88
Posts: 24,423
Reputation: 194,560


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest