Pumpkin Festival Error

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
kx3killza
Posts: 3
Joined: Mon Nov 26, 2012 3:41 am

Pumpkin Festival Error

#1 Post by kx3killza » Mon Nov 26, 2012 11:58 am

When i am running this script,
every few hours or so the bot stops and this message comes up on the micromacro window

User\Desktop\bot\micromacro\scripts\rom/bot.lua:505: onLoad error: [string "..."]:105: attempt to index local 'SmallStack' <a nil value>

I have not changed anything in the folders after the initial setup of SVN checkout on the rom folder in the micromacro folder,

Here is the waypoint im currently using,


-- wplata surek, zielone i opisane
GuildDonate()
GuildDonateItems({"Guild Rune", "xx", "oo"})
keptitems = {203163, 203086, 203087, 203085, 203291, 203292, 203293, 203294, 203295, 240743}

keptitems = {203163, 203086, 203087, 203085, 203291, 203292, 203293, 203294, 203295, 240743}

for k,v in pairs(keptitems) do
if inventory:itemTotalCount(v) > 0 then
local SmallStack = inventory:findItem(v);
SmallStack:delete();
end;
end;


</onLoad>
</waypoints>

If anyone can help me it would be very appreciated!

Thanks
Last edited by kx3killza on Mon Nov 26, 2012 8:23 pm, edited 1 time in total.

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

Re: Pumpkin Festival Error

#2 Post by rock5 » Mon Nov 26, 2012 12:07 pm

Code: Select all

 inventory:findItem(v)
will return nil if it doesn't find an item. Therefore

Code: Select all

SmallStack:delete()
will cause and error. Try

Code: Select all

if SmallStack then
    SmallStack:delete()
end
  • 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

kx3killza
Posts: 3
Joined: Mon Nov 26, 2012 3:41 am

Re: Pumpkin Festival Error

#3 Post by kx3killza » Mon Nov 26, 2012 1:14 pm

sorry but im pretty stupid when it comes to lua codes

but where do i put

if SmallStack then
SmallStack:delete()
end

and do i need to replacing something with that?

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

Re: Pumpkin Festival Error

#4 Post by rock5 » Mon Nov 26, 2012 1:17 pm

Search through the file and find

Code: Select all

SmallStack:delete();
and change it to

Code: Select all

if SmallStack then
    SmallStack:delete();
end
  • 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

kx3killza
Posts: 3
Joined: Mon Nov 26, 2012 3:41 am

Re: Pumpkin Festival Error

#5 Post by kx3killza » Mon Nov 26, 2012 1:26 pm

thanks :)

SpringSun
Posts: 4
Joined: Thu May 24, 2012 9:37 pm

Re: Pumpkin Festival Error

#6 Post by SpringSun » Fri Dec 07, 2012 3:09 am

can i just remove the line SmallStack:delete(); ?
i let lootomatic do the rest,because my bot keep stop working with that smallstack issue

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 2 guests