A small bitfield implementation. This lets you store 32 individual bits per number.
Here's an example of how you might use it with cartdata:
cartdata "mygame" --loading for i=0, 20 do bf.t[i]=dget(i) end --setting some flags bf[100]=true bf[101]=false --saving for i=0, 20 do dset(i, bf.t[i]) end |
Will add an expanded version for setting arbitrary sized datums soon. Usage is quite simple.
[Please log in to post a comment]