Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ Compiling the server
➜ a error in save.c when i compile swfote2.1.5.tgz
a error in save.c when i compile swfote2.1.5.tgz
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Jokercard
USA (13 posts) Bio
|
Date
| Mon 15 Jan 2007 09:13 PM (UTC) |
Message
| 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 |
Jokercard The Worlds Jester | Top |
|
Posted by
| Jokercard
USA (13 posts) Bio
|
Date
| Reply #1 on Mon 15 Jan 2007 09:17 PM (UTC) |
Message
| Also i forgot one other question on swfote how do you set the monthly revenue on the planets
thanks |
Jokercard The Worlds Jester | Top |
|
Posted by
| Tzaro
USA (41 posts) Bio
|
Date
| Reply #2 on Mon 15 Jan 2007 09:24 PM (UTC) |
Message
| 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 |
Implementer of Lost Prophecy,
Tzaro | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #3 on Mon 15 Jan 2007 09:33 PM (UTC) |
Message
| 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. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Jokercard
USA (13 posts) Bio
|
Date
| Reply #4 on Tue 16 Jan 2007 03:35 PM (UTC) |
Message
| 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. |
Jokercard The Worlds Jester | Top |
|
Posted by
| Jokercard
USA (13 posts) Bio
|
Date
| Reply #5 on Tue 16 Jan 2007 03:41 PM (UTC) |
Message
| 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 |
Jokercard The Worlds Jester | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #6 on Tue 16 Jan 2007 05:33 PM (UTC) |
Message
| 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. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Jokercard
USA (13 posts) Bio
|
Date
| Reply #7 on Tue 16 Jan 2007 09:03 PM (UTC) |
Message
| 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 |
Jokercard The Worlds Jester | Top |
|
Posted by
| Tzaro
USA (41 posts) Bio
|
Date
| Reply #8 on Wed 17 Jan 2007 01:28 PM (UTC) |
Message
| 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 |
Implementer of Lost Prophecy,
Tzaro | Top |
|
Posted by
| Jokercard
USA (13 posts) Bio
|
Date
| Reply #9 on Wed 17 Jan 2007 06:05 PM (UTC) |
Message
| 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. |
Jokercard The Worlds Jester | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #10 on Wed 17 Jan 2007 06:21 PM (UTC) |
Message
| 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 |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
28,748 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top