rev 513 error: Line 166 in inventory.lua

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

rev 513 error: Line 166 in inventory.lua

#1 Post by Starrider » Wed Oct 27, 2010 4:34 am

Code: Select all

Wed Oct 27 11:32:05 2010 : scripts\rom/bot.lua:7: D:/micromacro/scripts/rom/classes/inventory.lua:166: '<eof>' expected near 'end'
Wed Oct 27 11:32:05 2010 : Execution error: Runtime error
Last edited by Starrider on Wed Oct 27, 2010 4:41 am, edited 1 time in total.

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: rev 511 error: Line 166 in inventory.lua

#2 Post by swietlowka » Wed Oct 27, 2010 4:38 am

;) there rev 513 currently so maybe update first :d

Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: rev 513 error: Line 166 in inventory.lua

#3 Post by Starrider » Wed Oct 27, 2010 4:42 am

sry meant rev513, still get this msg

hellburns
Posts: 19
Joined: Fri Mar 12, 2010 3:46 am

Re: rev 513 error: Line 166 in inventory.lua

#4 Post by hellburns » Wed Oct 27, 2010 7:16 am

use revision 512's inventory.lua till someone can fix the new one

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: rev 513 error: Line 166 in inventory.lua

#5 Post by botje » Wed Oct 27, 2010 7:19 am

im using 512 too, im looking intoo the 513 issue, but it seems its closed correctly, fuck if i know why it errors xd

botje

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: rev 513 error: Line 166 in inventory.lua

#6 Post by botje » Wed Oct 27, 2010 7:23 am

oh wait, i found it, there is a end to much there

Code: Select all

function CInventory:useItem(itemNameOrId)
	self:update();

	item = self:findItem(itemNameOrId)
	if item then
			item:use();
			return true, item.Id, item.Name;
end;

	return false;
end;
thats the code you have to replace ^^

edit:

hmm, on second thought, this will not error, but always return false, so i think it should be

Code: Select all

Function CInventory:useItem(itemNameOrId)
	self:update();

	item = self:findItem(itemNameOrId)
	if item then
			item:use();
			return true, item.Id, item.Name;
		else
			return false;
	end;

end;
yeah, after 5 edits this should work xd, sorry for that, lua is not my native coding language xd
Botje

checkii
Posts: 50
Joined: Sat Oct 09, 2010 8:50 pm

Re: rev 513 error: Line 166 in inventory.lua

#7 Post by checkii » Wed Oct 27, 2010 11:26 am

For some reason the bot won't use items in 513 with the above edited code. I think there is something wrong with the return value.

As of right now 512 inventory is working correctly as far as I can tell.

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: rev 513 error: Line 166 in inventory.lua

#8 Post by botje » Wed Oct 27, 2010 11:28 am

im running it now, and it works fine... O.o

uses potions, opens bags.

Botje

Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: rev 513 error: Line 166 in inventory.lua

#9 Post by Starrider » Wed Oct 27, 2010 12:51 pm

this massage comes with your changes:

other error, sory this posted was my own fault, downt work anyway
Last edited by Starrider on Wed Oct 27, 2010 1:14 pm, edited 1 time in total.

hellburns
Posts: 19
Joined: Fri Mar 12, 2010 3:46 am

Re: rev 513 error: Line 166 in inventory.lua

#10 Post by hellburns » Wed Oct 27, 2010 12:54 pm

revert the inventory.lua to rev 512. ive been using it with that all day with no problems

Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: rev 513 error: Line 166 in inventory.lua

#11 Post by Starrider » Wed Oct 27, 2010 1:16 pm

ok step back to the rev505, last version when inventory.lua has been changed...

hellburns
Posts: 19
Joined: Fri Mar 12, 2010 3:46 am

Re: rev 513 error: Line 166 in inventory.lua

#12 Post by hellburns » Wed Oct 27, 2010 1:18 pm

revert inventory.lua only... nothing else to rev 512

Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: rev 513 error: Line 166 in inventory.lua

#13 Post by Starrider » Wed Oct 27, 2010 1:40 pm

yes i did, only using rev505 inventory.lua, rest is still rev. 513.

hellburns
Posts: 19
Joined: Fri Mar 12, 2010 3:46 am

Re: rev 513 error: Line 166 in inventory.lua

#14 Post by hellburns » Wed Oct 27, 2010 1:43 pm

dont need to go back that far lol

Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: rev 513 error: Line 166 in inventory.lua

#15 Post by Starrider » Wed Oct 27, 2010 3:02 pm

i didn't check http://code.google.com/p/rom-bot/source/list an you will understand...
rev505 is the version where inventory.lua has been changed the last time.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: rev 513 error: Line 166 in inventory.lua

#16 Post by rock5 » Thu Oct 28, 2010 1:39 am

Sorry for the slip. :oops:

This code should work. I've just added the local variable to botje's fix

Code: Select all

Function CInventory:useItem(itemNameOrId)
	self:update();

	local item = self:findItem(itemNameOrId)
	if item then
		item:use();
		return true, item.Id, item.Name;
	else
		return false;
	end;

end;
Unfortunately I've been busy all day and now the servers are down so I can't test it.

Does anyone else, besides checkii, find that botje's fix didn't work? Or does anyone find that it did work?

Unfortunately I wont be back online for about 20 hours so can't test it till then. Maybe someone else can commit the changes if it works before then?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Alkaiser
Posts: 222
Joined: Sat Sep 25, 2010 2:03 pm

Re: rev 513 error: Line 166 in inventory.lua

#17 Post by Alkaiser » Thu Oct 28, 2010 6:47 am

It works.

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: rev 513 error: Line 166 in inventory.lua

#18 Post by swietlowka » Thu Oct 28, 2010 9:06 am

i'd commit it but i can't ;)
anyone interested get it from attachement
Attachments
inventory.lua
(21.33 KiB) Downloaded 140 times

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: rev 513 error: Line 166 in inventory.lua

#19 Post by rock5 » Thu Oct 28, 2010 11:48 pm

Ok I've committed the fix to revision 514. I also fixed a couple of changed memory addresses.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: rev 513 error: Line 166 in inventory.lua

#20 Post by swietlowka » Fri Oct 29, 2010 1:48 am

gr8 :P
anyway are there any permissions to commit some changes?

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests