Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
frasten
Beginner


Joined: 06 Jan 2006
Posts: 24

PostPosted: Wed Dec 09, 2015 12:25 pm   

#TAG and leading spaces
 
I'm trying to configure my manual mapping script, and I'm facing a problem with leading spaces in descriptions, like this:

Code:
Stalle - Al chiuso
    Indubbiamente questi erano i locali ove la guarnigione
teneva le cavalcature. Probabilmente, a giudicare dalla
dimensione degli ambienti, doveva trattarsi proprio di cavalli
o comunque animali di taglia simile. Le stalle sono enormi,
e si stendono sia a nord che a sud da qui.


I have the description inside a variable called $description (which correctly contains the leading spaces), but trying with #TAG, I get a room with the leading spaces removed.

The code I'm using is this:

Code:
#tag desc {$description}


Is there a way to escape these leading spaces?

Thank you very much.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4662
Location: Pensacola, FL, USA

PostPosted: Wed Dec 09, 2015 4:10 pm   
 
Is there a reason you need to preserve the spacing in a database entry?

You could always manually reinsert them, or use %roomdesc.
_________________
Discord: Shalimarwildcat
Reply with quote
frasten
Beginner


Joined: 06 Jan 2006
Posts: 24

PostPosted: Wed Dec 23, 2015 12:55 pm   
 
Unfortunately, if I store the room description without the leading spaces and I use #FIND, the mapper doesn't find the room.
If I edit the room description and add the missing spaces, #FIND works flawlessly.

Any hints with this issue? Or at least, how to override the match algorithm in #FIND?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Dec 23, 2015 10:18 pm   
 
You might try:
Code:
#TAG desc {%quote($description)}

_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
frasten
Beginner


Joined: 06 Jan 2006
Posts: 24

PostPosted: Fri Dec 25, 2015 8:12 pm   
 
@Vijilante, thanks for your suggestion, but unfortunately the spaces are still removed.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4662
Location: Pensacola, FL, USA

PostPosted: Fri Dec 25, 2015 8:56 pm   
 
#EVENT onRoomCreate {#CALL %roomdesc(,@description)}

That might work, but it would require you to not use a local variable.

Use onRoomEnter for preexisting rooms.

You will likely have to play around with priority values to ensure the trigger to set @description fires before the event.
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net