generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Strange behavior RemoteFunction

Previous Thread :: Next Thread 
GNUnotUNIX is not online. GNUnotUNIX
Joined: 05 Feb 2012
Total Posts: 15171
13 Dec 2016 03:49 AM
So I have a remotefunction return a table.
Table:
0 = Hello
1 = World
2 = Are
3 = You
4 = Ending?

So I try to return that table with a remote function and I get the following table:
Table:
1 = World
2 = Are
3 = You
4 = Ending?

It completely ignores index 0.
How come this happens?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
13 Dec 2016 03:53 AM
You cannot send "mixed tables" through, and since Lua arrays start at 1 only the array-part is sent (from idx = 1 to #tbl) and the mapping from 0 to "Hello" is lost.
Report Abuse
GNUnotUNIX is not online. GNUnotUNIX
Joined: 05 Feb 2012
Total Posts: 15171
13 Dec 2016 03:55 AM
@cntkillme
Oh so arrays start at 0
Thanks for the info.
Report Abuse
GNUnotUNIX is not online. GNUnotUNIX
Joined: 05 Feb 2012
Total Posts: 15171
13 Dec 2016 03:55 AM
at 1**
Report Abuse
GNUnotUNIX is not online. GNUnotUNIX
Joined: 05 Feb 2012
Total Posts: 15171
13 Dec 2016 04:00 AM
Oh wow this also has ridden me of a "can not convert table" error which I didn't know why it happened.

Thanks a lot cntkillme
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
13 Dec 2016 04:15 AM
yup
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image