Table of selected Rooms?

User avatar
kevutian
Posts: 217
Joined: Fri Aug 20, 2010 8:18 pm
Location: United Kingdom
Contact:

Re: Table of selected Rooms?

Post by kevutian »

What version is the ppa at, though?

drak
Posts: 9
Joined: Sat Mar 30, 2013 2:25 am

Re: Table of selected Rooms?

Post by drak »

phasma wrote:What version is the ppa at, though?
I'm not following you on that one. What is ppa?

I did the update like you said and holy cow, now I have arrows for one way rooms! The menu works too!
Thank you. :)

On a side note:
A problem I can't seem to work around is the getExitStubs() returns a number if there are no room stubs, not an empty table. This throws an error in my script and will not allow it to finish. Do you know of a work around for this? Or a way to ignore an error and move on?

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Table of selected Rooms?

Post by Vadi »

See http://www.mudlet.org/download/ for the latest Ubuntu version of Mudlet.

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Table of selected Rooms?

Post by chris »

I noticed that w/ stubs in my scripts as well. I figured it was just an artifact from developing it on a map with different iterations of the exit stub code. I deal with it like this:
Code: [show] | [select all] lua
         local estubs = getExitStubs(roomID)
	 if type(estubs) == "table" then
		 for i,v in pairs(estubs) do
			...do stuff here
		 end
	 end

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Table of selected Rooms?

Post by chris »

It's doing that because the return value is 1 so you're getting what else is on the stack. Fixed in next release

drak
Posts: 9
Joined: Sat Mar 30, 2013 2:25 am

Re: Table of selected Rooms?

Post by drak »

chris wrote:I deal with it like this:
Awesome, I didn't realize type() was a function. Thank you :)

It would be nice to have a complete manual on everything. I have to have 10 tabs open when I program and I think I'm still missing some stuff. Mudlet is turning out to be pretty cool though. Using the keyboard to edit the map is actually alot easier then using a mouse. I made it to where I can walk around on my map without sending commands to the mud, that way I can move, merge, cut links, etc.. The find works flawlessly comparing name then description to move me back to where I'm at in the mud. The merge was messing up because of the exit stubs not being pulled in, but now thats fixed.

Thanks again!

User avatar
demonnic
Posts: 886
Joined: Sat Dec 05, 2009 3:19 pm

Re: Table of selected Rooms?

Post by demonnic »

For Mudlet specific stuff the wiki is the best place to look at the moment, I believe. We could not possibly cover all of Lua itself though and there are already many good resources for this. There are links to some of them on the main page at wiki.mudlet.org .

That being said, if you want to undertake the enormous job of putting together a comprehensive Mudlet + Lua manual I wouldn't want to dissuade you =)

Post Reply