tables within tables using lube lube.bin: pack/unpack

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
silver_hawk
Prole
Posts: 36
Joined: Mon Feb 27, 2012 2:19 pm

tables within tables using lube lube.bin: pack/unpack

Post by silver_hawk » Thu Mar 15, 2012 10:58 am

I'm trying to send tables within tables with lube, and I tried using different seperators and same seperators, but none of it seems to work, anyone got experience doing this stuff? I really want to send tables within tables.

User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: tables within tables using lube lube.bin: pack/unpack

Post by Robin » Thu Mar 15, 2012 11:46 am

What is your code?
Help us help you: attach a .love.

User avatar
trubblegum
Party member
Posts: 192
Joined: Wed Feb 22, 2012 10:40 pm

Re: tables within tables using lube lube.bin: pack/unpack

Post by trubblegum » Thu Mar 15, 2012 12:42 pm

You just need a decent JSON lib.

User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: tables within tables using lube lube.bin: pack/unpack

Post by kikito » Thu Mar 15, 2012 3:30 pm

There is TSerial. Or this thread about table serialization in the Lua Users wiki.
When I write def I mean function.

User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: tables within tables using lube lube.bin: pack/unpack

Post by bartbes » Thu Mar 15, 2012 5:02 pm

There's a reason lube.bin is no more.

meoiswa
Prole
Posts: 48
Joined: Wed Mar 14, 2012 8:13 pm
Location: Venezuela

Re: tables within tables using lube lube.bin: pack/unpack

Post by meoiswa » Thu Mar 15, 2012 5:34 pm

Attachments
Serialize.love
Contains serialize.lua and a little main.lua showing how to use it :)
(2.22 KiB) Downloaded 33 times
Write the ö of Löve with Alt+numPad(148) or Alt+numPad(153)

User avatar
silver_hawk
Prole
Posts: 36
Joined: Mon Feb 27, 2012 2:19 pm

Re: tables within tables using lube lube.bin: pack/unpack

Post by silver_hawk » Thu Mar 15, 2012 7:45 pm

Ty all of you I will try to read on some of the links, otherwise I will provide my code :D but maybe I could learn something usefull ;)

User avatar
silver_hawk
Prole
Posts: 36
Joined: Mon Feb 27, 2012 2:19 pm

Re: tables within tables using lube lube.bin: pack/unpack

Post by silver_hawk » Thu Mar 15, 2012 7:54 pm

bartbes wrote:There's a reason lube.bin is no more.
lube.bin is no more? I got an old version of lube or something?

User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: tables within tables using lube lube.bin: pack/unpack

Post by bartbes » Thu Mar 15, 2012 7:59 pm

You must have, check out the repo.

User avatar
silver_hawk
Prole
Posts: 36
Joined: Mon Feb 27, 2012 2:19 pm

Re: tables within tables using lube lube.bin: pack/unpack

Post by silver_hawk » Wed Apr 11, 2012 6:58 pm

TSerial did the trick very easy and effectively, everything is working fine now (except for the game ofc. but that is my fault), but packages are sent packed/unpacked properly now, ty for your time :)

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 33 guests