Shopkeepers
Posted by Tribulon
on Thu 20 May 2004 02:25 AM
— 22 posts, 90,762 views.
When I try to compile I get an error
c:\documents and settings\tl\my documents\bollier\smaugfuss\src\i3.c(28) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
Error executing cl.exe.,
and
Compiling...
imc.c
c:\documents and settings\tl\my documents\bollier\smaugfuss\src\imc.c(45) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
Error executing cl.exe.
I have put a copy of this file in every src, and several other folders, and have included this file as a header with my compiler. I am using Visual C++ 6.0 Standard.
Any suggestions? I have tried compiling each indivdually and it does the same both ways.
Also on tables.c, I get 561 warnings saying
Expression evaluates to a function which is missing an argument list. I don't know if this affects anything though.
If you're compiling on Windows, you should get a Windows port of SMAUG.
There is one here:
http://www.gammon.com.au/downloads/dlsmaug.htm
You should be able to compile with that. If not, I would suggest getting Cygwin. You can always edit in VC++ and compile in Cygwin; I did that for a while and it's not so bad.
I did get the Windows port from here. I tested the two files with the errors. When I took out the #include <uninstd.h>, they just went to another file that could not be found, so I think there must be some directory I need to place these in. Do you know of where it might be?
Well, normally this stuff is all compiled with Cygwin.
It's not a directory you need, it's just that Windows and *nix have different sets of header files. Fortunately most of it is the same but just in different spots. You could always try looking up the undefined symbols on MS's MSDN (msdn.microsoft.com) and see what header file they need.
Still, if you feel up to it, I would recommend installing and using Cygwin. It's a daunting task if you're not using to *nix, but well worth it for serious development.
You might just need to be using defines for the environment your on. I'm not sure if there is one specific for VC++, but, for example, windows is like this:
#ifdef WIN32
#include <winsock.h>
#include <sys/types.h>
#pragma warning( disable: 4018 4244 4761)
#define NOCRYPT
#define index strchr
#define rindex strrchr
#else
#include <unistd.h>
#endif
You might need to look through the documentation, maybe do a search through the help files for unistd.h, libraries, something like that, and it may tell you how to define it to work properly within VC++.
So, I have Cygwin now. What do I do now?
Compile, or so I think thats what you want to do. I haven't actually used Cygwin though. If you don't know much about it, type "make" in the src dir to compile.
Nick has excellent guides to Cygwin here. Check out:
http://www.gammon.com.au/smaug/howtocompile.htm
I have got it compiled! Now I just have a few question more to ask.
1. How do you create guilds (clans)?
2. Do any of you know which Cygwin package includes tcsh?
3. Have any of you ever heard of Scan, it lets you look 4 blocks E, W, S, N, U, D. If so, do you know where to get code for it?
4. Anyone have a detailed list of how to put together Skills and Spells, it could be useful.
1.) Use the command 'makeclan' and 'setclan'.
3.) Stock Smaug comes with the scan skill, I thought.
4.) I don't have one, but look over other simple skills, like kick.
2) The TCSH package has it. Its a package unto itself. If you run the install program again, it will let you add packages, just click the button in the upper-right hand corner to "All"( I think), and then scroll down, it should be in alphabetical order.
I did try to use Makeclan and Setclan. I think Makeclan works fine, but when I try to use Setclan it says 'No such clan' or something to that affect.
Also, about scan, it does have a lower version scan. It lets you look one direction. The one I am talking about is included not as a skill, and it scans every direction 3 or 4 distances away.
eg. When you type scan you get
the trainer who is not far off to the east.
the knight templar who is a brief walk away to the east.
A Baerlon sentry who is close by to the south.
Lord Jindukai who is close by to the south.
A teller who is close by to the west.
The peddler who is close by upwards.
Use quotes around the clan, or use the clan filename when using setclan.
Like:
setclan 'some clan' filename someclan.cln
I got the clan made, I know how to do that now.
When I make a shop it works just like I wanted it to, but when I shutdown the mud I have to make the shop again. Do I have to put it to a filename too? If I do, then is there a special extension I need?
You have to make the shop again? As in the whole mob? Are you adding a reset, and making it an actual shop, along with saving the area?
I have it made as a shopkeeper in Area Editor, but when I start up the MUD I have to use 'makeshop 9000' everytime before she will sell anything. When I type list it says "you can not do that here". Also, I could get the the MUD to create a clan file, but it still would not let me edit it or load it. It saves them as GUI. Is this wrong?
Also, does anyone have the code for a bank, somewhere to store money?
Hmm, I don't use AreaEditor, so I wouldn't know. I build everything on the MUD. You can't edit the clan file, with setclan?
Yes, check out www.mudmagic.com, they should have it there.
When you say making an actual shop, what do you mean? My MOB has the items it is supposed to sell, but I have to use makeshop on it every time before she will sell anything. I don't really understand how to use opedit, mpedit or any of these. The built in help is not very helpful.
I am trying to make a book that tells a story, how do I make it to where you can read the book while playing the game? I might have made it as a helpfile, but I do not know how to do that either.
Are you actually giving the mob an item, making a reset for the item and mob, having it makeshop, setting the correct shop variables, saving/folding the area, etc.
Thats what I meant by "actual".
The MOB does have plenty of items. Unless it saves automatically than I wasn't saving it. This is what happens when I try to use SAVEAREA.
<9999 | 5000 | 5000>-->9006> makeshop 9000
Build: Tiragel: makeshop 9000
Done.
<9999 | 5000 | 5000>-->9006> SAVEAREA
Build: Tiragel: SAVEAREA
You don't have an assigned area to save.
<9999 | 5000 | 5000>-->9006> SAVEAREA 9000
Build: Tiragel: SAVEAREA 9000
Area not found.
<9999 | 5000 | 5000>-->9006> SAVEAREA tribulon.are
Build: Tiragel: SAVEAREA tribulon.are
Area not found.
<9999 | 5000 | 5000>-->9006> sa
The sun rises and a fresh new day begins.
<9999 | 5000 | 5000>-->9006> savearea tribulon
Build: Tiragel: savearea tribulon
Area not found.
<9999 | 5000 | 5000>-->9006> l
Scrooge is here, counting his money leaves north.
<9999 | 5000 | 5000>-->9006> where
Players near you in Tribulon City:
Tiragel (Immortal) Accessory Shop
<9999 | 5000 | 5000>-->9006> savearea tribulon city
Build: Tiragel: savearea tribulon city
Area not found.
<9999 | 5000 | 5000>-->9006>
Note that I have to use Makeshop 9000 everytime I restart the MUD. Am I doing something wrong with SAVEAREA?
You need to actually assign the area to yourself so the olc recognizes you as an authorized builder with the right to muck around in the area.
I have renamed the thread and moved it into the Area Editor section of this forum, as I couldn't see what it had to do with compiling SMAUG.
Try searching the forum for "shop", it seems that is what you are really asking. Try this post:
http://www.gammon.com.au/forum/?bbsubject_id=318