Page 1 of 1

bad argument #1 error

Posted: Sun Jun 21, 2015 9:31 am
by Meth
im getting this error everytime i try to open MM v1.03.41.

D:/ROM/micromacro/scripts/rom/functions.lua:923: bad argument #1 to 'gsub' (string expected, got nil)

someone please help.


Also, im just wondering if it was possible to make a bot just to repair my gear whenever its under 50dura(to use simple repair hammer) and to use the skill regenerate every 20seconds. also if it was possible to see how much time and percentage it would be to raise the physical defense level. kinda like the weapon leveling script. except it checks the defense, uses regenerate (and if hp is 20% or less to use urgent heal). it be awesome if this was possible :) the bot doesnt have to move it just has to take hits and heal every 20secs.

Re: bad argument #1 error

Posted: Sun Jun 21, 2015 10:00 am
by rock5
Why are you using an old version of micromacro?

I don't see a gsub on line 923. Are you using an old version of the bot too?

Re: bad argument #1 error

Posted: Sun Jun 21, 2015 11:53 am
by beanybabe
This works but it does not check if you are out of hammers so it may pick up weapon and not put back if you are out of them.

Code: Select all

<onLeaveCombat>
	--	Repair main hand
	local dura = inventory:getMainHandDurability();
	printf("Main hand durability:%s\n", dura);
	if ( 50 > dura ) then
		inventory:useItem("Simple Repair Hammer");
		RoMScript("PickupEquipmentItem(15)");
		yrest(2100);
	end
-- Repair off hand
	local dura = inventory:getDurability(16);
	printf("Off hand durability:%s\n", dura);
	if ( 50 > dura ) then
		inventory:useItem("Simple Repair Hammer");
		RoMScript("PickupEquipmentItem(16)");
		yrest(2100);
	end

Re: bad argument #1 error

Posted: Sun Jun 21, 2015 4:12 pm
by Meth
@Rock5 yea i think im using a pretty old version of both. where can i get the new one and how can i set it up?

@Bennybabe i dont need one for weapons. but one for just the gear that loses dura with every hit that the mob does to me =) and would like to heal myself too with a HoT skill.

Re: bad argument #1 error

Posted: Mon Jun 22, 2015 12:47 am
by rock5
micromacro
RoMBot
  • http://solarstrike.net/project/rom-bot
    It used to be that the download was always out of date so using TortoiseSVN was the only way to get the latest version but I believe Administrator has put processes into effect that keep the download up to date.

    So you have a choice; you can just keep downloading the latest version using the download link or use the repository address with software like TortoiseSVN. Using TortoiseSVN is recommended for a number of reasons which include; being able to see which files have been edited in Explorer, being able to update without loosing your own edits and a lot of instructions on the forum assume TortoiseSVN is installed.

Edit: Actually the download link for rombot looks wrong. I'll contact Administrator about it. So the git repository might be the only place to get the very latest version, for now.

Re: bad argument #1 error

Posted: Mon Jun 22, 2015 10:20 am
by Meth
after i did a svn update i got a new error.

[Warning] This repository has deprecated!
Please update your repo URL to https://github.com/elverion/rom-bot-trunk

then in a yellow text i got..

D:\RoM\micromacro\scripts\rom'/bot.lua:72: D:/RoM/micromacro/scripts/rom/addresses.lua:33: unexpected symbol near '<'

Re: bad argument #1 error

Posted: Mon Jun 22, 2015 10:40 am
by rock5
I suggest you rename the rom folder, create a new rom folder then do a SVN Checkout with the github repository address. Then copy over your waypoints, profiles and userfunctions over to the new folder.

The error is probably from a conflict which the above steps should fix.

Re: bad argument #1 error

Posted: Tue Jun 23, 2015 9:36 am
by Meth
works perfectly thank you! =D