Page 1 of 1

Getting error since micromacro update

Posted: Sun Apr 17, 2011 2:11 pm
by kanta
I updated the micromacro program yesterday (v1.01) and I've begun to get the following error:

C:/micromacro/scripts/rom/classes/player.lua:2509: bad argument #1 to 'pairs' (table expected, got nil)

In the waypoint file I was trying to make I was using the travel waypoint type to gather mobs then stop after a bit and kill. Once it tried to target the error comes up. Just to test if it was/is a problem in my waypoint file I tested it with the wander waypoint. I get the error every time it tries to target a mob.

**UPDATE**
I reverted to the previous version and am still getting the error. Had the wander waypoint loaded, walking around and didn't even target a mob before I received the error.

Re: Getting error since micromacro update

Posted: Mon Apr 18, 2011 12:51 am
by rock5
What version of the bot are you using because I don't have a 'pairs' on line 2509 of player.lua. Have you edited player.lua? Do any of the rombot files not have green icons next to them in Explorer?

Re: Getting error since micromacro update

Posted: Mon Apr 18, 2011 7:12 am
by lisa
I have a commented out part of CPlayer:Logout at line 2509, going to need more info in order to help.

Re: Getting error since micromacro update

Posted: Mon Apr 18, 2011 7:53 am
by rock5
lisa wrote:I have a commented out part of CPlayer:Logout at line 2509, going to need more info in order to help.
Lisa, a good way to see what's supposed to be on a line is to right click the file and select "TortoiseSVN/Check for Modifications". Then on the left pane you can scrole down to right line and see what's supposed to be there.

Re: Getting error since micromacro update

Posted: Mon Apr 18, 2011 2:32 pm
by kanta
Yes, I do have it modified, was trying the Boss Focus found in this post: http://www.solarstrike.net/phpBB3/viewt ... 089#p20089. It doesn't really work for me, at least not for the reason I needed it (Zurhidon Negotiator). I had even forgotten I'd put it in there. I'll delete the modified files and run tortoise.

Just loaded the player.lua. It is indeed a problem with the boss coding. So I'll definitely be getting the unedited files again.

Code: Select all

-- returns true if target is in boss
function CPlayer:isInBoss(pawn)
	if( not pawn ) then
		error("CPlayer:isInBoss() received nil\n", 2);
	end;
 
	for i,v in pairs(settings.profile.boss) do <!-- line 2509 -->
		boss_defined = true;
		if( string.find( string.lower(pawn.Name), string.lower(v), 1, true) ) then
			return true;
		end
	end

	return false;
end
I apologize for the trouble this may have caused you.