Mudlet2+ Branch

phasma
Posts: 191
Joined: Sat Aug 03, 2013 7:00 pm
Discord: phasma#4694

Re: Mudlet2+ Branch

Post by phasma »

Just for the sake of completeness, these are the only functions where I call that function:
Code: [show] | [select all] lua
function ui.highlight_rooms()
	local r, g, b = unpack(color_table.red)
	local br, bg ,bb = unpack(color_table.white)
	local rooms = getAreaRooms(getRoomArea(mmp.currentroom))

	for _, room in ipairs(rooms) do
		highlightRoom(room, r, g, b, br, bg, bb, 1, 255, 255)
	end
end

function ui.highlight_room(room, ally)
	if ally then
		local r, g, b = unpack(color_table.yellow)
		highlightRoom(room, r, g, b, r, g, b, 1, 255, 255)
	else
		local r, g, b = unpack(color_table.red)
		highlightRoom(room, r, g, b, r, g, b, 1, 255, 255)
	end
end
The weird thing is, > type(unpack(color_table.red)) returns 255 (number) where the error shows it's trying to eval a string. What gives?

User avatar
keneanung
Site Admin
Posts: 94
Joined: Mon Mar 21, 2011 9:36 am
Discord: keneanung#2803

Re: Mudlet2+ Branch

Post by keneanung »

That does not like being the source of the error at all...

You seem to set a callback to a geyser label and supply a string as an argument. If you have a look at https://github.com/Chris7/Mudlet2/commi ... 5e03f5L107 you'll see that the command requires a table now.

phasma
Posts: 191
Joined: Sat Aug 03, 2013 7:00 pm
Discord: phasma#4694

Re: Mudlet2+ Branch

Post by phasma »

Ahh, missed that one... Thanks.

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

Re: Mudlet2+ Branch

Post by chris »

That is part of the lua code, which vadi usually handles. But this is breaking backwards compatibility so I would say it's a bug. Can you make a launchpad report about it?

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

Re: Mudlet2+ Branch

Post by Vadi »

It is already fixed in mudlet-lua - sync your branch with the latest code in it.

phasma
Posts: 191
Joined: Sat Aug 03, 2013 7:00 pm
Discord: phasma#4694

Re: Mudlet2+ Branch

Post by phasma »

Alright, been having another play with this. I just imported my system in and you'll notice how on the channel capture, it's eating half of the string and further, the map is simply refusing to display. I'm sure it's something silly I am missing. mudlet-lua was copied over just now, so it's not that. This same profile works fine when I use the Mudlet package from the Debian repo. No errors are being reported anywhere, so I am at a loss.

http://i.imgur.com/YbWYsOB.png

Any ideas?

Thanks in advance.

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

Re: Mudlet2+ Branch

Post by chris »

I would say your channel capture isn't setup to do multi-lined strings so that's why you aren't capturing everything. And your mapper isn't initializing for what can be many reasons.

Is there any reason you are posting this in this thread as opposed to a new thread?

phasma
Posts: 191
Joined: Sat Aug 03, 2013 7:00 pm
Discord: phasma#4694

Re: Mudlet2+ Branch

Post by phasma »

Mostly just given the issues are only present on this branch? Want me to create a new thread for it?

User avatar
Rakon
Posts: 350
Joined: Tue Feb 16, 2010 7:41 pm
Contact:

Re: Mudlet2+ Branch

Post by Rakon »

I'm having this issue as well. Trigger capture for the lines worked fine prior to using Mudlet 3.0 build.

I'll clarify:

Using Mudlet 3.0.0 Alpha on Windows 7 64 bit.

Trigger setup as follows:
Image

ChatStuff.append code :
Code: [show] | [select all] lua

function ChatStuff.append(chat)
  appendBuffer(string.format("chat%s", chat))
  if chat ~= "All" then
   appendBuffer(string.format("chatAll",chat))
  end
  local tab = string.format("tab%s", chat)
  return true
end
The copy() is only copying to the end of the first wrap in a sentence, tested by changing my trigger code above to the following:
Code: [show] | [select all] lua
selectCurrentLine()
copy()

echo("Pasted line shows:\n")

paste()

This code, produces the following on in the main GUI window when tested with feedTriggers:

Code: Select all

/feedTriggers("\n(The Midnight Crew): You say, \"This is a really long line 
that will wrap and show completely properly in the main screen but doesn't 
actually copy the full line to the chat window.\"\n")

(The Midnight Crew): You say, "This is a really long line that will wrap and show completely properly in the main screen but doesn't actually copy the full line to the chat window."Pasted line 
shows:
(The Midnight Crew): You say, "This is a really long line that will wrap 
and 

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

Re: Mudlet2+ Branch

Post by Vadi »

Thanks for the detailed test case!

Post Reply