cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 09 Nov 2015 03:57 PM |
We can't save embedded zeros to DataStores, in StringValues, as Names of objects (although this is a good thing to block), and so on.
Instead of treating strings in Lua as "NUL terminated strings" on the C++-side, can you treat them as actual Lua strings and use the length the compiler gives to Lua strings pleaseeeee. |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 09 Nov 2015 04:00 PM |
| Support need this for advanced object data serialization. |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2015 04:04 PM |
Support for the Scripters Cause. :P
Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784 |
|
|
| Report Abuse |
|
|
comonkey
|
  |
| Joined: 03 Jan 2010 |
| Total Posts: 272 |
|
| |
|
|
| 09 Nov 2015 04:26 PM |
wtf did u just say now
cackle |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 09 Nov 2015 04:44 PM |
| It's important that you support. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 09 Nov 2015 04:45 PM |
| If you don't support you will die. If you do support you still will die, but you won't feel good when you do so support. |
|
|
| Report Abuse |
|
|
| |
|
skullsten
|
  |
| Joined: 03 Feb 2012 |
| Total Posts: 2522 |
|
|
| 09 Nov 2015 05:17 PM |
| uhh ok u guys know wat ur doing |
|
|
| Report Abuse |
|
|
man1912
|
  |
| Joined: 16 Aug 2011 |
| Total Posts: 8798 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 09 Nov 2015 05:28 PM |
| man1912 do you even understand the problem? |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2015 05:39 PM |
| @man, I've got this feeling that you have no idea how to script. |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
| |
|
man1912
|
  |
| Joined: 16 Aug 2011 |
| Total Posts: 8798 |
|
| |
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 10 Nov 2015 09:59 AM |
| I am a furry. And it keeps me warm, thank you very much. |
|
|
| Report Abuse |
|
|
| |
|
powertool
|
  |
| Joined: 01 Feb 2008 |
| Total Posts: 3771 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 10 Nov 2015 12:15 PM |
| You don't JSONencode strings, and if you are implying we use a giant array of numbers then that severely restricts how much data we actually have, by more than 5x. |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
| |
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 10 Nov 2015 05:53 PM |
I love how he says to JSONEncode a string.
"Hey guys I have a genius idea let's encode a string into a string" |
|
|
| Report Abuse |
|
|
|
| 10 Nov 2015 06:23 PM |
| I thought they were already treated as Lua strings? I could have sworn I've used a null character before as a delimiter. |
|
|
| Report Abuse |
|
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 10 Nov 2015 06:28 PM |
| In Lua they are treated normally (c-sided), but when passing strings with NUL characters in them (or using them) in Roblox-specific things (mostly c++-sided), Roblox just reads the string up to the first NUL instead of using the length (which is known beforehand). |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 10 Nov 2015 06:32 PM |
Here easy way to replicate it:
local strVal = Instance.new("StringValue"); local str = "hello\0hello"; -- expected length: 11 (stored length: 12) strVal.Text = str; -- expecting to store 11 characters (12 in reality) print(#strVal.Text); -- got 5 (6 in reality)
|
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
| |
|