Mudlet-2.0-rc4 released

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Mudlet-2.0-rc4 released

Post by Heiko »

OK tried your scripts. You forgot to load the db in this snippet causing table.contains() to throw errors because your table clanners wasn't defined. Note that you can see all runtime errors caused by scripts by clicking the red ! button on the left side of the trigger editor window.

After loading the table, clanners is now properly defined and I get this output:
Image

Does this solve your problem or is there something else that I've missed?

Yetzederixx
Posts: 186
Joined: Sun Nov 14, 2010 5:57 am

Re: Mudlet-2.0-rc4 released

Post by Yetzederixx »

I'll check what you pointed out, but the "who" list wouldn't be affected by the script that triggers during the "gather" procedure that works from the "whoc" list (who being everyone of course, and whoc being who clan or essentially who pk).

As you can see from your screen shot Dekkan wasn't in the database when you first gather'd, but was subsequently since his name was now highlighted in blue. Also, did you notice the second of lag between typing gather and whoc being issued? It never, ever lagged like this, though that may be because of the errors.

I still haven't given up on rc4 as it works fine in all other places so I'll go and check. I missed a loading trigger that fires off the welcome screen.

Pattern (begin of line): ------===+*<==( Dark and Shattered Lands: Main Login Menu )==>*+===------
Code: [show] | [select all] lua
loadDB()
--I cut other stuff out that loads my gui elements and disables some automaton triggers
Really need to work on transferring some stuff to events.

Yetzederixx
Posts: 186
Joined: Sun Nov 14, 2010 5:57 am

Re: Mudlet-2.0-rc4 released

Post by Yetzederixx »

By typing gather the "Disable Whoc Gathering" calls the loadTable() fn which issues the db:fetch command after the "Whoc Gathering" trigger calls addPerson() which in turn calls the db:add() fn. Everything works except for the table.contains that I can see, because if you ignore the constant echo's when it is trying to add already existent people it's actually adding them since their names are subsequently colored by the "Clan Highlighter" trigger and associated fn's.

I just typed gather two seconds ago and I get no error messages in my console also, sorry I forgot the init trigger earlier, and thanks a ton for helping me with this.

Yetzederixx
Posts: 186
Joined: Sun Nov 14, 2010 5:57 am

Re: Mudlet-2.0-rc4 released

Post by Yetzederixx »

Now that my internet is back up I see what you mean about the error's in the console.

Here's a log of me after I closed mudlet down. I log in, check the contents of the clanners table to see if it loaded (which it did) and then gather twice.
log.html
(122.15 KiB) Downloaded 1119 times
Here's a log of the error console after I typed gather the first time:
error.txt
(2.64 KiB) Downloaded 349 times

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Mudlet-2.0-rc4 released

Post by Heiko »

OK I can confirm that your db script somehow causes a ton of lag in rc4 compared to rc2. I'm curious what the source of this regression is actually as the Lua db files have not been modified. This needs to be dealt with.

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Mudlet-2.0-rc4 released

Post by Heiko »

OK the lag problem completely disappears when you replace the folder mudlet-lua in rc with the mudlet-lua folder from rc2 (haven't tested rc3 but this prolly works also). So the problem seems to be in the new changes in the mudlet-lua library.
Please try this bug fix to see wheather I'm correct and if all of your issues are gone. Then we need to find out what has been changed in our convenience library that caused the problems.

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Mudlet-2.0-rc4 released

Post by Heiko »

The problem has been fixed. Replace the folder mudlet-lua with this:
https://github.com/Beliaar/mudlet-lua

Yetzederixx
Posts: 186
Joined: Sun Nov 14, 2010 5:57 am

Re: Mudlet-2.0-rc4 released

Post by Yetzederixx »

That fixed the problem right up.

For those like me:
Click the downloads button and then choose between the .zip or tar.gz file
Then extract the contents into the mudlet-lua folder which is found in C:\Users\<username>\AppData\Local\Mudlet\mudlet-lua\

Thanks again Heiko, and anyone else that worked on it, it is appreciated.

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

Re: Mudlet-2.0-rc4 released

Post by Rakon »

Where table functions for lua changed or messed with for this latest RC? Coming from RC2 to RC4 (2.0) and table.contains is not returning the correct values (True/False) as it once did in RC2.
Code: [show] | [select all] lua
function ink_tattoo(tat,loc,twho)
 local tattoos = {['cloak']= {'3 blueink'}} -- cut down this list to an easy one to see

 if table.contains(tattoos, tat) then 
  for k,v in pairs(tattoos[tat]) do
   send('outr ' .. v)
  end
  send( string.format("ink %s on %s of %s", tat,loc,twho))
  expandAlias('pause')
 else
  al_alert('THAT TATTOO IS NOT IN THE LIST!')
 end
end
When I call this function with 'ink_tattoo('cloak','head','me')' I get the alert returned:

<-ALERT->: THAT TATTOO IS NOT IN THE LIST!

Now, running the following lua/mudlet code returns the output shown:

Code: Select all

display(tattoos['cloak'])

table {
  1: '3 blueink'
}

Code: Select all

display(table.contains(tattoos,'cloak'))

false
Something I'm doing wrong somehow, even though it was working correctly/fine previously??

OS: Ubuntu 10.10 X64
Self-compiled Mudlet from latest git head (yesterday night)

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

Re: Mudlet-2.0-rc4 released

Post by Rakon »

Read a few posts up. Replaced mudlet-lua folder in the src dir with the one quoted by Heiko, restarted, and lua tableUtils started working as expected again.
Heiko wrote:The problem has been fixed. Replace the folder mudlet-lua with this:
https://github.com/Beliaar/mudlet-lua

Post Reply