- Joined
- Apr 1, 2008
- Messages
- 2,064
- Reaction score
- 507
- Points
- 113
O.K. Now I've got some things done to the LUA code, I would like to ask how would I test the oapi.deflate() & oapi.inflate() functions in Lua?
Testing oapi.rand() & oapi.getcolor() was easy:
but how would a lua script look to test whether oapi.deflate() & oapi.inflate() work?
Something like this "pseudo-code"
Please help, 'cause I'm not going to spend much time learning LUA in depth.
When I've managed to get this running I'll try to add further functionality.
@martins: I think LuaMFD hass two files missing (resource.h & LuaMFD.rc).
I took the liberty and re-created them as I think they were
Would be nice if they would be added in the next commit (yours, not mine)
---- EDIT ----
Attachment removed due to post #438
Testing oapi.rand() & oapi.getcolor() was easy:
Code:
term.out(oapi.rand())
term.out(oapi.getcolor(1,2,3))
Something like this "pseudo-code"
Code:
inp = 'Hello World!' // input buffer
pak = '' // packed buffer
out = '' // re-inflated buffer
r1 = oapi.deflate(inp, sizeof(inp), pak, 255)
r2 = oapi.inflate(pak, sizeof(pak), out, 255)
term.out(r1)
term.out(r2)
term.out(in == out)
When I've managed to get this running I'll try to add further functionality.
@martins: I think LuaMFD hass two files missing (resource.h & LuaMFD.rc).
I took the liberty and re-created them as I think they were
Would be nice if they would be added in the next commit (yours, not mine)
---- EDIT ----
Attachment removed due to post #438
Last edited: