windowChoice? error

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

windowChoice? error

#1 Post by ZZZZZ » Tue Apr 08, 2014 4:45 pm

After looting chests in Garden sometimes MM errors with the below message.

Code: Select all

Player Teleported to X: -182    Z: -43  Y: 8
The game client did not crash.
7:37am - E:\micromacro\scripts\rom/login.lua:51: [string "..."]:146: attempt to
index field '?' (a nil value)
This is the part of the function where it happens (after the chests disappear and before moving to the NPC)

Code: Select all

   for i = 1, #path do
      if (os.time() - starttime) > 60 then break end
      teleport(path[i].X,path[i].Z,path[i].Y)
      openchest(true)
   end
	cprintf(cli.purple,"\nTotal # chests looted: "..chestLootedCounter.."\n")
	exitNPC = player:findNearestNameOrId(123562)
	--teleport(-140,-302,5)
	player:moveTo(exitNPC);
	player:target_NPC(123562) -- Kekonee
	ChoiceOption(1)
	waitForLoadingScreen()
end

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: windowChoice? error

#2 Post by lisa » Tue Apr 08, 2014 5:32 pm

I don't know Z that doesn't seem to add up.

The error message you posted says it teleported to a location in the table and then errored before doing anything else, so it didn't do print of number of chests and it didn't move to NPC.

The error itself seems weird, erroring in login.lua at line 51 is the include("bot.lua") and line 146 of bot.lua is about the args that you do when starting bot, like path: and profile:

So yeah I don't understand, is something else going on in the script, a timer maybe?
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: windowChoice? error

#3 Post by ZZZZZ » Tue Apr 08, 2014 6:05 pm

It's only running the same function that you made for Secret Garden, so I don't believe there is anything else. It doesn't happen every time either, it seems completely random. But out of 150+ characters that I run through the Garden, probably 20-30 get it.

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: windowChoice? error

#4 Post by ZZZZZ » Tue Apr 08, 2014 6:08 pm

Same spot, different error this time:

Code: Select all

Player Teleported to X: -182    Z: -43  Y: 8
The game client did not crash.
9:05am - [string "..."]:146: attempt to index field '?' (a nil value)
144 - 147 in my waypoint is

Code: Select all

      local function distancesortfunc(a,b)
         return b.distance > a.distance
      end
      table.sort(tablechest, distancesortfunc)

User avatar
Administrator
Site Admin
Posts: 5331
Joined: Sat Jan 05, 2008 4:21 pm

Re: windowChoice? error

#5 Post by Administrator » Tue Apr 08, 2014 6:34 pm

Check the log. The stack traceback might help.

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

Re: windowChoice? error

#6 Post by rock5 » Tue Apr 08, 2014 9:13 pm

It's strange because login.lua is only used to start clients. It should not be being used in the middle of a running script. There isn't even any relogging happening, it's just teleporting.
  • 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

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: windowChoice? error

#7 Post by ZZZZZ » Wed Apr 09, 2014 2:30 am

I was running 4 clients at the time, could they have somehow been conflicting? Though I hadn't had this issue until recently and I havn't changed anything.

~~ actually I had downloaded latest version of login and fastlogin userfunctions. That was all i believe.

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: windowChoice? error

#8 Post by ZZZZZ » Thu Apr 10, 2014 3:55 am

Odd...I added teleport_SetStepSize(70) to Garden script a while back because I was getting some rubberbanding after the chests, in the hope it would reduce it. Since taking out that line the bot only returned that error 4-5 times in all my characters. I'll run them again tomorrow (assuming garden is still there) and see if its the same deal, might even put it back in to check if that was actually the cause.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: windowChoice? error

#9 Post by lisa » Thu Apr 10, 2014 5:10 am

each teleport is only around 50-55 anyway, isn't it?
So reducing max teleport distance each step to 70 won't affect it.

this is first 2 spots, distance is 50.

Code: Select all

Command> local x1,z1,x2,z2 = -139,-291,-106,-253 print(math.sqrt( (z2-z1)*(z2-z1) + (x2-x1)*(x2-x1) ))
50.328918128646
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: windowChoice? error

#10 Post by ZZZZZ » Thu Apr 10, 2014 7:59 am

Sorry, i meant after the timer was up I had it teleport to the npc and that's where it was getting rubber band.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: windowChoice? error

#11 Post by lisa » Thu Apr 10, 2014 8:08 am

ZZZZZ wrote:Sorry, i meant after the timer was up I had it teleport to the npc and that's where it was getting rubber band.
After that many small teleports I would just walk it, takes just a few seconds and you have less issues.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: windowChoice? error

#12 Post by ZZZZZ » Fri Apr 11, 2014 12:43 am

lisa wrote:After that many small teleports I would just walk it, takes just a few seconds and you have less issues
Yeh thats what I ended up doing, then forgot to remove that line. Hence the -- in front of teleport

Code: Select all

exitNPC = player:findNearestNameOrId(123562)
   --teleport(-140,-302,5)
   player:moveTo(exitNPC);
Ran all my alts through again today, didn't get the error this time. So it must have been the step size somehow causing it. Doesn't make sense but w/e.

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

Re: windowChoice? error

#13 Post by rock5 » Fri Apr 11, 2014 3:00 am

Was the teleport step pause changed as well? If it was reduced then that might explain it. If it's set too small it might be trying to teleport too quickly, ie. not waiting long enough between teleports.
  • 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

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: windowChoice? error

#14 Post by lisa » Fri Apr 11, 2014 3:28 am

yeah pause was changed to low at the start because after each teleport you have a few seconds while it opens 2 chests, so wasn't an issue. Could just change the pause back to default after opening chests I guess.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest