|
| 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
|
  |
| 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 |
|
|
|
| 13 Dec 2016 03:55 AM |
@cntkillme Oh so arrays start at 0 Thanks for the info. |
|
|
| Report Abuse |
|
|
| |
|
|
| 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
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|