Page 1 of 1

memoryChunk.getData() documentation

Posted: Fri Mar 03, 2017 2:58 pm
by 3cmSailorfuku
I hope there are still people around.

Anyway, it seems getData() is lacking another parameter

Code: Select all

number|string memorychunk:getData(string type, number offset)

Code: Select all

local o_chat = process.readChunk(pHandle, 0x2089B520, 520000);
local s_chat = o_chat.getData("string", 0); -- Wrong number of parameters supplied to getData()
print(s_chat);
Edit: Figured it out. It needs it's own userdata, then the type, then a start offset, then an end offset. 4 parameters in total.

Re: memoryChunk.getData() documentation

Posted: Mon Mar 06, 2017 10:14 pm
by Administrator
I'm still around. I'll admit I haven't been working on MicroMacro so much lately. Largely in part to it not having any real projects to work towards, but also because I've got very little time to work on it.

I'm noticing that you used a dot ('.') in place of a semicolon (':') in your example. The difference is that the dot calls it as a function and expects the first parameter to be the object's pointer ('this' / 'self'), while the semicolon executes a method on an object (hence, no need to specify the object).