![]() |
#1 |
Senior Member
|
Alright, I have this...what... codebase I guess. I tried compiling it with Make in mandrake linux. But I get about a thousand different errors in db.c, and I am far from a capable coder, is there anyone out there (KaVir?) that can take a look at the code and try to compile it in there system? I found this code somewhere on the net a long time ago, it's called Swordquest and I think it's all custom code, not sure, but I will upload it to my site and post a link to it if anyone replies and will help me out, thanks.
-Delerak |
![]() |
![]() |
![]() |
#2 |
Senior Member
|
![]() Try posting some of the errors to this forum. I'm sure someone can help ya out. An http link to the codebase is also useful.
|
![]() |
![]() |
![]() |
#3 |
Senior Member
|
I can't recall the main error, I know it had mainly to do with db.c here is a link to the codebase, I can always go into mandrake, compile then copy/paste the errors.
|
![]() |
![]() |
![]() |
#4 |
Senior Member
|
![]() These were the messages that I got:
[code] gcc -c -O -Wall -ggdb db.c db.c;982;8; macro names must be identifiers db.c; In function `load_resets'; db.c;942; warning; unused variable `pRoomIndex' db.c;943; warning; unused variable `pexit' db.c;932; warning; unused variable `buf' db.c; In function `reset_area'; db.c;1525; warning; unused variable `pObjToIndex' db.c; In function `find_string_references'; db.c;3031; warning; suggest explicit braces to avoid ambiguous `else' db.c;3037; warning; suggest explicit braces to avoid ambiguous `else' db.c;3050; warning; suggest explicit braces to avoid ambiguous `else' db.c;3056; warning; suggest explicit braces to avoid ambiguous `else' db.c;3069; warning; suggest explicit braces to avoid ambiguous `else' db.c;3075; warning; suggest explicit braces to avoid ambiguous `else' db.c;3088; warning; suggest explicit braces to avoid ambiguous `else' db.c;3094; warning; suggest explicit braces to avoid ambiguous `else' db.c;3107; warning; suggest explicit braces to avoid ambiguous `else' db.c;3113; warning; suggest explicit braces to avoid ambiguous `else' db.c;3126; warning; suggest explicit braces to avoid ambiguous `else' db.c;3132; warning; suggest explicit braces to avoid ambiguous `else' db.c;3142; warning; suggest explicit braces to avoid ambiguous `else' db.c;3153; warning; suggest explicit braces to avoid ambiguous `else' db.c;3159; warning; suggest explicit braces to avoid ambiguous `else' db.c;3170; warning; suggest explicit braces to avoid ambiguous `else' db.c;3176; warning; suggest explicit braces to avoid ambiguous `else' db.c;3187; warning; suggest explicit braces to avoid ambiguous `else' db.c;3193; warning; suggest explicit braces to avoid ambiguous `else' db.c;3204; warning; suggest explicit braces to avoid ambiguous `else' db.c;3210; warning; suggest explicit braces to avoid ambiguous `else' db.c;3221; warning; suggest explicit braces to avoid ambiguous `else' db.c;3227; warning; suggest explicit braces to avoid ambiguous `else' make; *** [db.o] Error 1[/quote] The only thing preventing you from compiling that file is the line: db.c:982:8: macro names must be identifiers This line is an #ifdef 0 line that essentially removes a section of code up until the #endif. 0 is not an identifier, so you need to give it a better name with #define. At the top of the source file I added #define COMPILESECTION 0, and then I changed that line to #ifdef COMPILESECTION and it worked as advertised. There were no other errors in the compilation, except an undefined reference to crypt which is also easily remedied. Edit: Err, and that should really be #if instead of #ifdef =). |
![]() |
![]() |
![]() |
#5 |
Senior Member
|
Thank you!
|
![]() |
![]() |
![]() |
#6 |
Senior Member
|
What command did you use to boot the mud? I tried QUEST and QUESTstartup but they won't work. I think I fixed that other problem, here is what I get now.
|
![]() |
![]() |
![]() |
#7 |
Senior Member
|
![]() In the Makefile, change the line that reads:
$(CC) $(L_FLAGS) -o $(OUT_FILE) $(O_FILES) To: $(CC) $(L_FLAGS) -o $(OUT_FILE) $(O_FILES) -lcrypt And those undefined references should go away. I did not start the mud, but that file named 'QUESTstartup' looks mighty suspicious. |
![]() |
![]() |
![]() |
#8 |
Senior Member
|
![]() Yeah, startup is indeed screwed up. You need to mkdir QUESTplr, QUESTlog, and QUESTrmsave. Then you need to edit the Makefile and change the line:
OUT_FILE = QUESTtest To: OUT_FILE = QUESTexecutable Then edit QUESTarea/area.lst and move the areas 'ys.are' and 'food.are' above 'dcity.are'. The file should look something like this when you're done: help.are limbo.are stdeq.are food.are ys.are dcity.are random.are elfforst.are celemir.are outscele.are $ Then it should work. |
![]() |
![]() |
![]() |
#9 |
Senior Member
|
Going to go try that now, thanks again Yui.
|
![]() |
![]() |
![]() |
#10 |
Senior Member
|
Okay compiled worked. I'm trying to start it up now, when I do
./QUESTstartup it freezes my terminal, when I do ./QUESTexecutable is says area.1st no such file or folder. Now maybe I have to edit one of those? *goes and gets a book on C* -Delerak |
![]() |
![]() |
![]() |
#11 |
Senior Member
|
Woah, wait it minute, it's working, weird! Thanks Yui I got it!
-Delerak |
![]() |
![]() |
![]() |
#12 |
Senior Member
|
Man this is weird. Do I accept my own character within the shell, I can probably figure it out. I've finally found a codebase that I can work my RPI with. Praise be to alah. You are my god Unifex! Looking for an apprentice?
-Delerak |
![]() |
![]() |
![]() |
#13 |
New Member
Join Date: May 2003
Posts: 8
![]() |
Btw, that base isn't custom like you thought, its obviously a diku/merc derivative, judging by the copyrights in the files. Either way, it doesn't mean its bad or anything, just thought you should know.
|
![]() |
![]() |
![]() |
#14 |
Senior Member
|
Okay, I got it working, but I can't seem to get my character on. I had to create QUESTnewplr and I got the pfile, I looked over review.c but it doesn't give me much information except how to do it if I am online in the game and I can't get in the game without accepting myself, is there something I need to do to the pfile or is it a command in my shell? I've messed around for a while with it, any help? Yui come to my rescue again?
-Delerak |
![]() |
![]() |
![]() |
#15 |
Senior Member
|
![]() Alrighty, it's not too tough fix your playerfile. Move the unapproved pfile in QUESTnewplr to QUESTplr. Then edit the pfile and change the line that reads "Act 1604" to "Act 1600". That '4' signifies the UNAPPROVED bit for new players. With that gone, you should be able to login without problems. It looks like level 40 is also the highest immortal level (at least from looking at the command table), so you can set your level there too and login as an admin.
If you want to remove the approval process altogether, you can just comment out the line "SET_BIT( d->character->act, PLR_UNAPPROVED );" in comm.c line 1742. |
![]() |
![]() |
![]() |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
d20 Codebase | caspin00 | MUD Coding | 8 | 04-29-2004 04:31 PM |
Looking for a particular codebase... | Scrod Fungus | MUD Coding | 4 | 02-11-2004 07:43 PM |
Looking for Codebase | Khadgar | MUD Coding | 1 | 08-16-2003 01:25 PM |
Looking for a Codebase. | Jenred | MUD Coding | 1 | 08-28-2002 10:49 PM |
SWR Codebase:Help | Metathran Elf | MUD Builders and Areas | 1 | 07-19-2002 10:17 AM |
|
|