okay i download swfote2.1.5.tgz from the mud magic web site and i am getting a error when i compile it i am useing cygwin for this code just to let you know what i am useing
here is the error that keeps on comeing up when i try to compile swfote2.1.5.tgz in cygwin
o/save.o
save.c: In function `load_corpses':
save.c:2285: error: `DIR' undeclared (first use in this function)
save.c:2285: error: (Each undeclared identifier is reported only once
save.c:2285: error: for each function it appears in.)
save.c:2285: error: `dp' undeclared (first use in this function)
save.c:2295: warning: implicit declaration of function `opendir'
save.c:2303: warning: implicit declaration of function `readdir'
save.c:2303: warning: assignment makes pointer from integer without a cast
save.c:2305: error: dereferencing pointer to incomplete type
save.c:2307: error: dereferencing pointer to incomplete type
save.c:2348: warning: implicit declaration of function `closedir'
make[1]: *** [o/save.o] Error 1
make: *** [all] Error 2
what do i do to fix that if anyone could tell me.
thanks
Also i forgot one other question on swfote how do you set the monthly revenue on the planets
thanks
I'm unfamiliar with SWF so I won't be of much help until I actually download it / compile it.
Anyway, the error message you're getting.. " * undeclared (first use in this function)" is a simple way of saying:
"Hey, You're using a variable but haven't specified what that variable is. Is it a char, int, short, etc? Is it supposed to be a constant? Tell me what this variable is supposed to be and I'll get back to you. Until then, I'm not gonna compile."
Basically, go in there and find DIR on line 2285. Find out what function it's in... find out what DIR is supposed to be (I'll assume it's a global declaration, so it's supposed to be defined in a .h file maybe?) and declare that variable in that function at the top. Do the same for 'dp'.
Again, I'll download SWF and take a look at it for you. In the mean time, work on figuring out what DIR and dp are supposed to be. :)
Tz
This has to do with things being declared in different header files under Cygwin. I believe that this problem has come up several times; you could try searching for it on these forums (a search for DIR might be enough, but maybe not).
The include you need is sys/dirent.h or sys/direct.h or something like that. Maybe without the sys part.
okay i will try to take a look at it and figure it out i am as noobie as noobie can get when it comes to codeing though but i will give it a shot. oh is there a web site i can look at that shows you how to code i can't get the book because i am totally blind so i would have to have it on the computer. and i also need to know how to set the revenue on the swfote. thanks again for your guys help and for putting up with a noob.
oh by the way i can't use the editer in cygwin when i went to install cygwin and i checked everything in the devel tree and when i went to check a couple editers in the editer tree the download wouldn't work so i just checked everything in the devel tree and the download worked so i can't go to a sertant line i use word pad to edit the files so when you take a look at the swfote2.1.5.tgz if you could describe what the lines are i have to change that would be great thanks again you guys
What do you mean when you say that the download wouldn't work? Did you get an error message?
As for learning to program, your best bet is probably to google for C tutorial or something like that. You could try going to a university's introductory CS class websites, e.g. cs106a.stanford.edu, and look and the handouts there.
the cygwin download woudn't work properly but i got that figured out anyway and thanks for the info on where to learn to code
oh, heh... after reading some of the posts here, I think I know what the issue might be.
At the top of the .c file, look for all the #include < *.h >
Add the following to the top of them:
#include <io.h>
If that doesn't work, try adding:
#include <dirent.h>
Anyway, I believe the thingy in question is in regards to sys/dir.h... which cygwin doesn't like. Somewhere, in on of their files, they mention it's obsolete and has been replaced with io.h. Hopefully one of the two things listed above will work for you. Let me know either way...
-Tz
well i did that but it is still saying the same error for the load_corpses and i couldn't figuere out why but i did what you said. if anything else i will just use that swfotefuss that is on this site i can get that up and running but the thing i don't like about it is for some reason you can't land on the capital ships, 2 when you try to mset someone in a clan the mud crashes, and three when a player buys a ship with the buyship command it doesn't put the name of the ship next to the name the player gives it. but when you do buyclanship or clanbuyship what ever that command is it puts the ship name next to the name the player gives it like it is suppose to i hope i explained that good enough.. and i don't know how to fix either of those problems and can't find anyone that knows how to that has delt with the swfotefuss on this site. but i think i will give up on the swfote2.1.5 and just use the swfotefuss so if you know anyone that could tell me how to fix thoses problems in the swfotefuss that woul be great and also tell me how to set the monthly revenue and population of the planets.
Regarding the MUD crashing when you mset someone into a clan, there are two things:
1. I'm not sure you're supposed to do that in the first place, because it doesn't correctly update clan member counts and so forth.
2. To examine the crash you need to use gdb to get a backtrace, as described in the link I gave you the other day:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=3653