Page 1 of 2

MicroMacro update; testers needed

Posted: Wed Dec 19, 2012 1:24 pm
by Administrator
There's going to be a whole lot of changes when 1.3 is ready. Some of these changes could potentially cause a number of issues with instability or things just not functioning as they should.

So, that's why we need more people to help test. Try using the attached copy of MicroMacro. Please, for the time being do not overwrite your existing copy until any and all bugs are sorted out.

Report any problems you have in this thread. Particularly, I'm looking for any errors (Lua or otherwise) that occur, program hangs or crashes.

EDIT: Deprecated; testing phase over

Re: MicroMacro update; testers needed

Posted: Fri Dec 21, 2012 7:23 pm
by botje

Code: Select all

Changing to next character on the same account.
Did not find any crashed game clients.
1:20am - .../Dropbox/micromacro/scripts/beta/classes/player.lua:47: bad arg
ument #2 to 'string.format' (not a non-negative number in proper range)


AL lib: FreeContext: (02A7CF18) Deleting 1 Source(s)
Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
as you see this happened when switching chars, dunno why though :P

reboot of game fixed it though...

Re: MicroMacro update; testers needed

Posted: Fri Dec 21, 2012 8:49 pm
by Administrator
I don't see any mention of string.format near that line in that file so I'm guessing there's a difference in versions. Probably that line has already been updated by rock5 and just hasn't been committed yet. Certain things with Lua 5.2 are a bit more strict so that can cause minor issues like what you are reporting.

Re: MicroMacro update; testers needed

Posted: Fri Dec 21, 2012 9:40 pm
by lisa
none of the versions of rombot I have on my pc have a string.format at line 74 player.lua, not sure which version you are using.

As for the error itself I have also had other things with the same error "not a non-negative number" but to be honest I couldn't even say what version of MM or rombot I was using at the time, I need to reorganise it all, too many versions of everything atm lol

I have noticed a couple of times with MM 1.02 beta 6 it error with trying to use yield outside of "something", can't remember exact error message.

I'll organise my files today and do some testing.

Re: MicroMacro update; testers needed

Posted: Fri Dec 21, 2012 9:52 pm
by rock5
I seem to remember getting a similar string.format "not a non-negative number in proper range" in relation to a printf type command. I think the issue was to do with using negative numbers when using %x in the pattern.

Assuming you are using the RC version then line 47 is

Code: Select all

		cprintf(cli.green, language[40], self.Address);
I think the address has to be greater than 0x7FFFFFFF to be read as a negative number. Is that possible? I guess we could just play it safe and change the Int read to a UInt read to be sure.

Re: MicroMacro update; testers needed

Posted: Fri Dec 21, 2012 11:22 pm
by Administrator
rock5 wrote:I seem to remember getting a similar string.format "not a non-negative number in proper range" in relation to a printf type command. I think the issue was to do with using negative numbers when using %x in the pattern.

Assuming you are using the RC version then line 47 is

Code: Select all

		cprintf(cli.green, language[40], self.Address);
I think the address has to be greater than 0x7FFFFFFF to be read as a negative number. Is that possible? I guess we could just play it safe and change the Int read to a UInt read to be sure.
That's exactly right. Signed and unsigned integers are stored the same way in memory. Basically, it's impossible to tell the difference between a high positive number and a low negative number. Addresses should always be unsigned integers.

Re: MicroMacro update; testers needed

Posted: Sat Dec 22, 2012 1:49 am
by rock5
It's a big job to turn all the address int reads to uint reads. I can think of 2 things to search for to find them all "address =" and "ptr =". That gives me a lot of results. I'll probably have to try variations of those too eg. without spaces. Can you think of any other ways I can search to get more results?

And you know, this could be the root cause of other issues that have been difficult to solve. Eg. at the moment I'm trying to figure out why it doesn't always loot. It's as if it doesn't see the lootable bodies. I'll have to test it again as soon as I've converted as many int reads to uints as I can find.

Re: MicroMacro update; testers needed

Posted: Sat Dec 22, 2012 1:54 am
by lisa
I did search for
memoryReadRepeat("int"
in pawn.lua it had 21 results only 4 were returning an address as the value.

So yeah it would involve going through each file I guess and checking each one, can't just blindly do a replace all.

8 results in player.lua, 3 of them are addresses.

a search for
"memoryReadInt"
gets a lot more results.

Re: MicroMacro update; testers needed

Posted: Sat Dec 22, 2012 2:34 am
by rock5
I guess memoryreadInt and variations of memoryreadrepeat(getproc(),"int would be the best way to make sure you don't miss any.

BTW I'm using FileSeek so I'm searching all files at once. :)

Re: MicroMacro update; testers needed

Posted: Sat Dec 22, 2012 3:31 am
by lisa
yeah I use notepad++ and search in files.

We should prob move this discussion out of the beta test MM topic as it's more to do with rombot than MM.

Re: MicroMacro update; testers needed

Posted: Mon Dec 24, 2012 6:15 am
by botje
createpath does'nt work with this, how can i fix it?

Code: Select all

Choose your character that you want to play on:

mychar1
mychar2
12:16am - attempt to yield from outside a coroutine

Re: MicroMacro update; testers needed

Posted: Mon Dec 24, 2012 10:00 pm
by lolita
NoobBotter worldtravel function dont work with this

Code: Select all

Command> takemeto("VaranasBridge")
Now Transporting to Varanas Gates
onLoad error: ...scripts/RC2/userfunctions/userfunction_worldtraveler.lua:154:
attempt to call field 'gfind' (a nil value)

Re: MicroMacro update; testers needed

Posted: Tue Dec 25, 2012 11:10 am
by Jandrana
I don't know what has changed in the upcoming release. But perhaps you could add a high precision timer info to the OS class.

Something like the Windows QueryPerformanceCounter() function would be nice. The os.time() function only has a one second resolution, which is too coarse for some applications.

Re: MicroMacro update; testers needed

Posted: Tue Dec 25, 2012 11:21 am
by rock5
os.clock() has increments of about 1ms. It returns values in seconds and fractions of a second. If you need even more accuracy you can use getTime(). getTime() returns a table, though, so you have to use another function deltaTime() to return the difference between 2 getTimes(). So you would use it like this

Code: Select all

starttime = getTime()

....

elapsedtime = deltaTime(getTime(),starttime)
I believe this returns values in ms and fractions of ms.

Re: MicroMacro update; testers needed

Posted: Tue Dec 25, 2012 1:36 pm
by Administrator
botje wrote:createpath does'nt work with this, how can i fix it?

Code: Select all

Choose your character that you want to play on:

mychar1
mychar2
12:16am - attempt to yield from outside a coroutine
Are you sure this file is up to date? There's no yields outside of yrest(), which should check if it's in a coroutine before attempting to yield.

Re: MicroMacro update; testers needed

Posted: Tue Dec 25, 2012 4:42 pm
by botje
its latest with the RC from rock.

Re: MicroMacro update; testers needed

Posted: Tue Dec 25, 2012 8:47 pm
by rock5
I just tested a completely fresh copy of the RC and associated files and this version of micromacro and, besides a small bug in update.lua (update.lua:1023: invalid escape sequence), I didn't get that error.

Re: MicroMacro update; testers needed

Posted: Tue Dec 25, 2012 9:04 pm
by botje
wtf... i restarted game and all O.o

ill test again... xd

Re: MicroMacro update; testers needed

Posted: Tue Dec 25, 2012 9:18 pm
by lisa
I get the same error as posted, well I do and I don't

Code: Select all

12:16am - attempt to yield from outside a coroutine
I get it on my win 7 32 bit machine but I don't seem to get it on my win 7 64 bit, still testing to see if I can narrow it down.

Re: MicroMacro update; testers needed

Posted: Thu Dec 27, 2012 3:36 pm
by rock5
Not only does "rom/createpath" not work but also "rom/update".

Code: Select all

Script> rom/update
Opening update.lua...
Starting script execution - Press CTRL+C to exit.
Press CTRL+L to cancel execution and load a new script.
-------------------------------------------------------------------------------
7:16am - attempt to yield from outside a coroutine
Although strangely "rom/bot update" does. It has something to do with the new micromacro. It's something Administrator will have to fix.