Hey,
it would be awesome if the two utils in the title would work perfectly with table_to_json and json_to_table!
Currently they dont support ":{
Greetz,
Luzifer
util.encode /util.decode
- LuziferSenpai
- Filter Inserter
- Posts: 333
- Joined: Tue Jul 08, 2014 10:06 am
- Contact:
Re: util.encode /util.decode
Can you post an example Lua table that doesn't work with the functions?
- LuziferSenpai
- Filter Inserter
- Posts: 333
- Joined: Tue Jul 08, 2014 10:06 am
- Contact:
Re: util.encode /util.decode
Sry my Fail, I looked into the character table string and didnt saw these three, but it encodes this:
into this:
and back, so I was thinking without testing. Well you can come to that point too, when you just read the string.
Code: Select all
local Types =
{
["01"] =
{
["01"] = "item",
["02"] = "entity",
["03"] = "technology",
["04"] = "recipe",
["05"] = "item-group",
["06"] = "fluid",
["07"] = "tile",
["08"] = "signal",
["09"] = "achievement"
},
["02"] = "entity",
["03"] = "technology",
["04"] = "recipe",
["05"] = "item-group",
["06"] = "fluid",
["07"] = "tile",
["08"] = "signal",
["09"] = "achievement"
}
Code: Select all
eyIwMSI6eyIwMSI6Iml0ZW0iLCIwMiI6ImVudGl0eSIsIjAzIjoidGVjaG5vbG9neSIsIjA0IjoicmVjaXBlIiwiMDUiOiJpdGVtLWdyb3VwIiwiMDYiOiJmbHVpZCIsIjA3IjoidGlsZSIsIjA4Ijoic2lnbmFsIiwiMDkiOiJhY2hpZXZlbWVudCJ9LCIwMiI6ImVudGl0eSIsIjAzIjoidGVjaG5vbG9neSIsIjA0IjoicmVjaXBlIiwiMDUiOiJpdGVtLWdyb3VwIiwiMDYiOiJmbHVpZCIsIjA3IjoidGlsZSIsIjA4Ijoic2lnbmFsIiwiMDkiOiJhY2hpZXZlbWVudCJ9
Re: util.encode /util.decode
I think you are just not understanding the function, it can encode any string
Using encode with json to table is used in the PvP scenario and there have been 0 issues reported with it
Using encode with json to table is used in the PvP scenario and there have been 0 issues reported with it
- LuziferSenpai
- Filter Inserter
- Posts: 333
- Joined: Tue Jul 08, 2014 10:06 am
- Contact:
Re: util.encode /util.decode
Okay, sry! Was just reading throw it.
Can be closed.
Can be closed.