Welcome to the Achaea Forums! Please be sure to read the Forum Rules.

Mudlet cecho and unwanted newlines

CaliraCalira Member, Secret Squirrel Posts: 162 ✭✭✭ - Distinguished
There seems to be a problem with cecho where it will insert an extra newline. For example, a trigger to highlight a web tattoo should display something like this:
https://ada-young.appspot.com/pastebin/0XLlocHQ

But the exact same trigger inserts an extra newline when it catches the first-person pattern, causing it to look like this:
https://ada-young.appspot.com/pastebin/f1T0DI2T

My Achaea screenwrap is disabled, and Mudlet's screenwrap is set to 81
It's a problem that's peeved me for a while, and I've love some help in find a solution.

The trigger parameters, for reference: https://ada-young.appspot.com/pastebin/OAVk9TD0

Comments

  • CalaurnCalaurn Member Posts: 53 ✭✭✭ - Distinguished
    cecho("\n<steel_blue>\[\-\-\[<yellow>WEB <steel_blue>HAS <violet_red>HIT <yellow>" .. tar .. "<steel_blue>\]\-\-\]")


    \n has to go. Like this:

    cecho("<steel_blue>\[\-\-\[<yellow>WEB <steel_blue>HAS <violet_red>HIT <yellow>" .. tar .. "<steel_blue>\]\-\-\]")

  • AntoniusAntonius Member Posts: 3,842 @@ - Legendary Achaean
    They have one trigger with two different patterns, running the same code, and only one of them has that additional empty line, so it's unlikely that it's the \n that's the problem. Removing the \n means that one of them just ends up echoing to the end of the line, rather than on a new line.

    Check for other triggers for the line that's giving you issues, and see if any of those are echoing things. May also be worth changing your Mudlet line length and seeing if the problem persists.
    Calaurn
  • ZahanZahan Member Posts: 185 ✭✭✭ - Distinguished
    edited November 2016
    I don't know about mudlet cecho to comment on the syntax, but in mush there are 2 different colour echos - one that builds on previous content and one that uses it own's line.  Barring something like that for mudlet, or figuring out where that extra blank line is actually coming from, a really bad/dirty solution might be to have the trigger activate a (or add a one-shot) blank-line-gag trigger.

    Click here for Nexus packages
    Currently available: Abs, Cnote, Keepalive, Lootpet, Mapmod
Sign In to Comment.