m&m system

by Vadi

Back to Mechanic's Corner.

Daganev2012-05-09 10:52:59
My debug and error windows don't always show me things in easy to read fonts, but I was able to make out a lot of null reference errors.

Lately, though the problem seems to dissapear and then re-appear again. I thought it was because of using 1 or 2 monitors, but that has not proven to be the cause.
Daganev2012-05-10 16:19:05
Finally got the error to happen again. It seems to only happen when I go in or out of the Arena in Glomdoring.


*** starting new session ***
object: function:

object: function:
<>

object: function:
<>


object: function:
<>
object: function:
<./mudlet-lua/lua/GUIUtils.lua:871: attempt to call global 'type' (a nil value)>
object: function:
<./mudlet-lua/lua/GUIUtils.lua:871: attempt to call global 'type' (a nil value)>
object: function:
<>

object: function:
<./mudlet-lua/lua/GUIUtils.lua:871: attempt to call global 'type' (a nil value)>
object: function:
<>
object: function:
<>
object: function:
<./mudlet-lua/lua/GUIUtils.lua:871: attempt to call global 'type' (a nil value)>
object: function:
<>
object: function:
<>


EDIT: Removing the silly errors from my code which are not relevant.
Vadi2012-05-10 21:20:34
You overwrote the Lua function of type, so anything that uses it - which is a lot - broke. Don't do that!

See where you've used type = and change the type variable name to something else.
Daganev2012-05-11 07:53:15
Does that mean that when you pass a var into a function or define a var in a function definition that it's scope is not local?
Rivius2012-05-11 10:32:30
Not unless you specifically say so with "local" eg.
local type = "whatever"

This sets it to local wherever you currently are: eg. local to that function if in a function.
Daganev2012-05-11 11:15:04
So what does the following code do?

function randomFunction(type)
local type = type
-- do stuff with type
end

Does that set the local value of type to the value of global type, or to the value of the parameter that was passed in?
Vadi2012-05-11 11:22:44
Both are local, this sample code couldn't be at issue (http://codepad.org/9xHrBjZz).
Unknown2012-05-11 11:59:28
If you need to convert a local to a global, just use:

_G.type = type
Vadi2012-05-19 21:58:51
12.5.2 update


This update brings Cavalier lines, and fixes systems with access to Healing not curing regen affs since the last update.


Changelog:


  • added and documented mm.me.locks
  • added another symptom for being lusted (from trying to enemy)
  • added Cavalier lines!
  • added hot weather making you sweaty (slickness)
  • added more bashing triggers
  • added recognition for Healing Sacrifice
  • added respect, burningpower defs
  • adjusted warrior lines to recognize a partial block as well as parry
  • fixed blind symptoms at times not registering
  • fixed some cases for acrobats when the system didn't realize that you didn't actually go prone
  • fixed systems with Healing available not curing regen affs (came from an error in optimizing it: now if Healing is getting a regen aff, the system won't apply a salve for that)
  • fixed up some angel lines
  • improved the unread msgs line at login to be clickable
  • limbs being crippled will now recognize if Psychometabolism BoneDensity tic'd
  • quickened sap curing (if you get proned while you're going to scrub - it'll start getting up right away instead of seeing scrub fail)
Vadi2012-05-20 21:55:36
12.5.3 update


This quick update fixes an sparkles resetting vessels count when using for them (the inconsistency between health and sparkles vessels cure lines got confused there...) and adds a new feature - mmconfig showbaltimes! Works just for balance and equilibrium for now, and shows you how long have you taken to regain that balance.


Changelog:


  • added a new mmconfig option: showbaltimes. Shows how long your balance/equilibrium took to recover!
  • added two new events: m&m got balance and m&m lost balance (works for balance and equilibrium only so far)
  • fixed sparkles resetting the vessels count
Enyalida2012-05-22 02:02:10
Hmm. I'm on 12.5.3, and I don't seem to be tracking cavalier wounds at all. I'm getting the afflictions but not applying health or parrying/stancing. Is this a known bug, or should I send logs?
Unknown2012-05-22 06:32:50
Logs would probably be good. If I had to hazard a guess, some of the initial sentences (Swinging a sword, etc etc) aren't being captured.
Vadi2012-05-23 20:58:30
Enyalida:

Hmm. I'm on 12.5.3, and I don't seem to be tracking cavalier wounds at all. I'm getting the afflictions but not applying health or parrying/stancing. Is this a known bug, or should I send logs?


No, not a known bug - they should work. Did you import the new xml as well as replace the folder on disk?
Ushaara2012-05-25 00:03:01
Just wondering if there's a way to disable the new yellow highlights on warrior affs? I'm a minimalist highlight/echo wise. :(
Unknown2012-05-25 00:38:10
Ushaara:

Just wondering if there's a way to disable the new yellow highlights on warrior affs? I'm a minimalist highlight/echo wise. :(

I'd love a way to pick what highlights I wanted or not in general that didn't require me to go in and find the ones I don't like every time I update.
Unknown2012-05-30 12:37:01
I'm not sure what's causing it (yet), but twice this morning I've had issues where whenever I mount my horse the system automatically dismounts me and orders the beast to follow when I get balance back. Not sure if there's a configuration option for that or what.
Daganev2012-05-30 15:32:00
Deschain:

I'm not sure what's causing it (yet), but twice this morning I've had issues where whenever I mount my horse the system automatically dismounts me and orders the beast to follow when I get balance back. Not sure if there's a configuration option for that or what.


type VA
Unknown2012-05-30 16:22:12
Personally I just ignored riding altogether (mmignore riding) because it was super annoying.
Vadi2012-05-31 03:54:13
Yeah it's better for people who have a balance-free mounting.
Tavon2012-06-13 03:08:29
Trying to make a simple script, to check and store my current Charisma after I finish defup.

Made a new script, called it "CheckCha"

Added "m&m done defup" as the event handler

have: send("show cha") as the code

Debug gives it an error, says:



Alias name=Switch a defence mode(^mm ?defs(?: (\\w+))?$) matched.
Alias: capture group #1 =
Alias: capture group #2 =

line under current user cursor: 135#:
P_begin(-1/135), P_end(-1/135) selectedText =
LUA: ERROR running script CheckCha (CheckCha) ERROR:m&m done defup
ERROR: window doesnt exit


EDIT: Unrelated issues.