Welcome, Guest. Please login or register.
Kingdoms of Ahln
Pages: [1]
  Print  
Author Topic: Small bug with aset.  (Read 339 times)
Saffire
Citizen
***
Posts: 136


View Profile
« on: June 14, 2009, 01:29:02 am »

When setting sensory descriptions with aset <object> <smell|feel|texture|taste|sound|listen> <description>, I ran into problems when I tried to do this:

Quote
aset here smell the subtle smell of oleander fills the room.
Cannot find here smell the subtle to edit.

Because the regex wasn't correctly capturing the input. To fix it, I took the following two lines from components/commandparser:

Code:
when /^aset\s+(.*)\s+(@\w+|smell|feel|texture|taste|sound|listen)\s+(.*)$/i
when /^aset!\s+(.*)\s+(@\w+|smell|feel|texture|taste|sound|listen)\s+(.*)$/i

And made them:

Code:
when /^aset\s+(.*?)\s+(@\w+|smell|feel|texture|taste|sound|listen)\s+(.*)$/i
when /^aset!\s+(.*?)\s+(@\w+|smell|feel|texture|taste|sound|listen)\s+(.*)$/i

So that first wildcard is ungreedy, and it seems to have fixed the problem. Yay.
Logged
Justin
Administrator
Citizen
*****
Posts: 189



View Profile
« Reply #1 on: June 22, 2009, 06:08:08 pm »

I guess I was a bit zealous a while ago when I (thought I) changed all these commands to work on objects with names longer than a single word. I'll go back through and check them...
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2006-2009, Simple Machines
Terra97 design by Bloc