Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-02-2004, 12:07 PM
m0oni9
Hill Giant
 
Join Date: Dec 2003
Posts: 166
Default Allowing commas in perl quest text

Commas haven't been able to be used in quest text because they are used as a delimiter for the command queue. The idea behind this is to always assume that quest::say and quest::echo take a single argument. Parser::ExCommands() seems to handle everything fine as long as num_args is set to 1 for these commands. Changes below:

zone/embparser.cpp, line 387, replace:
Code:
size_t num_args = std::count(args.begin(), args.end(), ',') + 1;
with:
Code:
size_t num_args = 1;
if (!(!strcmp(cmd.c_str(), "say") ||
      !strcmp(cmd.c_str(), "echo") ))
          for (const char *c = args.c_str(); *c; c++)
             if (*c == ',')
                num_args++;
I only did this for say and echo commands. If any others need this, they should be added easily. Also, as a side note, using std::count(), things were coming out funny (previous data hiding somewhere, don't know full details). Using the C-style delimiter count works.
Reply With Quote
  #2  
Old 04-02-2004, 01:59 PM
Scorpious2k's Avatar
Scorpious2k
Demi-God
 
Join Date: Mar 2003
Location: USA
Posts: 1,067
Default

This was fixed quite a while ago... what version are you using?
__________________
Maybe I should try making one of these servers...
Reply With Quote
  #3  
Old 04-02-2004, 02:08 PM
m0oni9
Hill Giant
 
Join Date: Dec 2003
Posts: 166
Default

I am using 0.5.5-RC2, downloaded from http://cvs.biosprite.net yesterday. This post was in response to http://www.eqemulator.net/forums/viewtopic.php?t=13874 . I tested the script sandy had posted, and it crashed when used in conjunction with other things (handing items to NPCs, summoning items, ...).
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:40 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3