|
frasten Beginner
Joined: 06 Jan 2006 Posts: 24
|
Posted: 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. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
|
frasten Beginner
Joined: 06 Jan 2006 Posts: 24
|
Posted: 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? |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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 |
|
|
|
frasten Beginner
Joined: 06 Jan 2006 Posts: 24
|
Posted: Fri Dec 25, 2015 8:12 pm |
@Vijilante, thanks for your suggestion, but unfortunately the spaces are still removed.
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
|
|
|