Skipping input lines?

Posted by Oli on Tue 31 Jul 2018 08:43 AM — 2 posts, 11,441 views.

#0
I've just had a trigger fail. The code looks like this:


Send("sh")
Send("get pickaxe from bags")
Send("hold pickaxe")


But when I check logs the MUD has only seen this:


sh
hold pickaxe


Is there a chance things are going to fast for the MUD or something? It's really frustrating I've noticed such things a couple of times.
USA Global Moderator #1
Quote:
Is there a chance things are going to fast for the MUD or something


Anything is possible, but I think that for it to be true your MUD would have had to be specifically written to discard messages that arrive quickly. I've never seen a server that doesn't buffer at least a few messages that have arrived faster than they can be processed, but I can think of reasons why someone might choose to do it for a MUD. What happens if you put in some small delays using wait.lua like so?


require "wait"
wait.make (function ()
  Send("sh")
  wait.time(0.5)
  Send("get pickaxe from bags")
  wait.time(0.5)
  Send("hold pickaxe")
end)