Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-16-2009, 04:11 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Commented that while out for now to try to get around it and now getting these compile errors:

Code:
command.cpp:13397: error: ‘_strlwr’ was not declared in this scope
command.cpp:13447: error: ‘sprintf_s’ was not declared in this scope
command.cpp:13458: error: ‘sprintf_s’ was not declared in this scope
command.cpp:13472: error: ‘_TRUNCATE’ was not declared in this scope
command.cpp:13472: error: ‘strncpy_s’ was not declared in this scope
command.cpp:13595: error: ‘sprintf_s’ was not declared in this scope
command.cpp:13600: warning: suggest parentheses around assignment used as truth value
command.cpp:13644: error: ‘sprintf_s’ was not declared in this scope
command.cpp:13649: warning: suggest parentheses around assignment used as truth value
command.cpp:13674: error: ‘_TRUNCATE’ was not declared in this scope
command.cpp:13674: error: ‘strncpy_s’ was not declared in this scope
command.cpp:13676: warning: comparison between signed and unsigned integer expressions
command.cpp:13688: error: ‘_strupr’ was not declared in this scope
command.cpp:13703: error: ‘strcpy_s’ was not declared in this scope
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 07-16-2009, 06:03 AM
Kobaz
Hill Giant
 
Join Date: Nov 2008
Location: Gold Coast, Oz
Posts: 119
Default

I've hit this in my "trying to learn C++ adventure". The *_s functions are Microsoft only. For sprintf_s you might try the POSIX snprintf:

Code:
int snprintf(char *str, size_t size, const char *format, ...);

   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

       snprintf(), vsnprintf(): _BSD_SOURCE || _XOPEN_SOURCE >= 500 ||
       _ISOC99_SOURCE; or cc -std=c99

 The  functions  snprintf()  and  vsnprintf()  write  at most size bytes
       (including the trailing null byte ('\0')) to str.
This is from the man pages with glibc version 2.2
Reply With Quote
  #3  
Old 07-16-2009, 08:11 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Note that I moved the code related portion of this thread into the Server Code Submissions section here:

http://www.eqemulator.net/forums/showthread.php?t=28916

Code related discussion should go there and any other comments on it should go here to keep the code thread as clean as possible.

P.S. I can't wait to try this command out once it compiles properly in Linux!
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 08-16-2010, 05:04 PM
Bellos
Hill Giant
 
Join Date: Jul 2007
Posts: 111
Default

hey guys can you only use objects from .eqg files or can you use em from .s3d files also. If so how do you add from an s3d file as they never show up do you add the whole line like CAMPFIRE_DMSPRITEDEF in the doors table

or do you just add CAMPFIRE or do you skip the DM and do CAMPFIRE_SPRITEDEF
Reply With Quote
  #5  
Old 08-17-2010, 12:28 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

For most objects (maybe all of them), you need to add _ACTORDEF to the end of the name for them to work. So, "CAMPFIRE" becomes "CAMPFIRE_ACTORDEF".

Also, you might want to use s3dspy or the global model viewer to find your models for objects. The .mod files are the ones you want. Another thing is to make sure you always add the name in all capitals or they won't work.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #6  
Old 08-17-2010, 12:54 AM
Bellos
Hill Giant
 
Join Date: Jul 2007
Posts: 111
Default

so for CAMPFIRE its CAMPFIRE_ACTORDEF not SPRITEDEF right and only .mod files can be used?


And you can use objects from s3d and eqg right not just eqg?
Reply With Quote
  #7  
Old 08-17-2010, 06:42 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

You can only use the object from the zone that is loaded. It will be either the eqg or the s3d of the zone you are in. If the zone you are in has both file types, it always loads the eqg version and ignores the s3d version. If you want to use the old version, you can rename your eqg version and restart EQ.

And no, if the full name is CAMPFIRE_SPRITEDEF.mod, then you will need to add CAMPFIRE_SPRITEDEF_ACTORDEF, I think. You can test this out in-game fairly easily by using the #object command. Just type the following:

#object add 12345 0 CAMPFIRE_SPRITEDEF_ACTORDEF

Of course that is only going to work if that model name really exists in the zone you are wanting to use it in. It doesn't look right to me, but I don't know where you got that from.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply

Thread Tools
Display Modes

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 04:53 AM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3