Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, DotBot, Bing

Members: 0
Guests: 9
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,388
627
MargoThurb
Today's Birthdays
whisperedecho (34)
Related Links
» SmaugMuds.org » General » Coding » Help with a codebase.
Forum Rules | Mark all | Recent Posts

Help with a codebase.
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Aug 8, 2011, 12:32 pm
Go to the top of the page
Go to the bottom of the page

antram
Apprentice
GroupMembers
Posts58
JoinedNov 22, 2010

Hello everybody:

I found some days ago a codebase wich I would like to see, but it makes me some problems. Someone can help me?

the first problem I found is:

imc.c: In function 'imc_purge_skeleton':
imc.c:7418: error: lvalue required as left operand of assignment
imc.c:7419: error: lvalue required as left operand of assignment

The code is:

void imc_purge_skeleton( CHAR_DATA *skeleton )
{
if( !skeleton )
return;

#ifdef IMCCIRCLE
IMCSTRFREE( skeleton->player.name );
IMCSTRFREE( skeleton->player.short_descr );
#else
IMCSTRFREE( (char *)skeleton->name );
IMCSTRFREE( (char *)skeleton->short_descr );
#endif
IMCDISPOSE( skeleton );

return;
}

Thanks a lot for help.

Antram
       
Post is unread #2 Aug 8, 2011, 8:58 pm
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010


antram said:


void imc_purge_skeleton( CHAR_DATA *skeleton )
{
   if( !skeleton )
      return;

#ifdef IMCCIRCLE
   IMCSTRFREE( skeleton->player.name );
   IMCSTRFREE( skeleton->player.short_descr );
#else
   IMCSTRFREE( (char *)skeleton->name );
   IMCSTRFREE( (char *)skeleton->short_descr );
#endif
   IMCDISPOSE( skeleton );

   return;
}


The issue I see is under the else part, you have (char *) when it shouldn't be there, as far as I can tell. Change the else part to this, and you should be fine:
#else
  IMCSTRFREE(skeleton->name);
  IMCSTRFREE(skeleton->short_descr);

Cheers,
Aurin
       
Post is unread #3 Aug 9, 2011, 7:06 am
Go to the top of the page
Go to the bottom of the page

antram
Apprentice
GroupMembers
Posts58
JoinedNov 22, 2010

Hello Aurin:

thanks for help, but now makes me another problem. here is what the compiler says:

~/cm3/src
o/t_c.o: In function `imc_adjust_perms':
/ht_e/Antonio/cm3/src/imc.c:3269: undefined reference to `_CH_IMCLEVEL'
/ht_e/Antonio/cm3/src/imc.c:3271: undefined reference to `_CH_IMCLEVEL'
/ht_e/Antonio/cm3/src/imc.c:3271: undefined reference to `_CH_IMCLEVEL'
/ht_e/Antonio/cm3/src/imc.c:3273: undefined reference to `_CH_IMCLEVEL'
/ht_e/Antonio/cm3/src/imc.c:3273: undefined reference to `_CH_IMCLEVEL'
o/t_c.o:/home/Antonio/cm3/src/imc.c:3275: more undefined references to `_CH_IMCL
EVt_' follow
o/t_t_info.o: In function `do_password':
/ht_e/Antonio/cm3/src/act_info.c:2470: undefined reference to `_crypt'
o/t_t_wiz.o: In function `do_form_password':
/ht_e/Antonio/cm3/src/act_wiz.c:3821: undefined reference to `_crypt'
o/t_ild.o: In function `do_mset':
/ht_e/Antonio/cm3/src/build.c:1477: undefined reference to `_crypt'
o/t_mm.o: In function `nanny':
/ht_e/Antonio/cm3/src/comm.c:1704: undefined reference to `_crypt'
/ht_e/Antonio/cm3/src/comm.c:1784: undefined reference to `_crypt'
o/t_mm.o:/home/Antonio/cm3/src/comm.c:1805: more undefined references to `_crypt
' t_llow
collect2: ld returned 1 exit status
make[1]: *** [rmexe] Error 1
make: *** [all] Error 2
Antonio@Antonio-PC ~/cm3/src
$

¿do you know what the problem is?

Thanks again.

Antram
       
Post is unread #4 Aug 9, 2011, 9:49 am
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

Ahh..crypt errors. Are you using cygwin, by chance? If so, you'll need to go into each file that brings up a crypt error and add the following to the top:
#include <crypt.h>

This would work regardless, but is really only needed to be done for cygwin. If you're not using cygwin, then you'll need to download crypt libraries (I believe) onto the server you are using--or have them download the libraries so that they work. If you happen to have JUST gotten the codebase, I'd recommend looking for the sha256 snippet, which will have all the encryption stuff be local to your mud files and not rely on server files. Note, this option requires a LOT of work to implement, as it's basically a rewrite of the encryption stuff.

I couldn't help ya with the rest, as you'll need to post the related functions for the imc stuff.
       
Post is unread #5 Aug 9, 2011, 4:48 pm
Go to the top of the page
Go to the bottom of the page

antram
Apprentice
GroupMembers
Posts58
JoinedNov 22, 2010

Hello aurin:

Thanks a lot for your help. I've already compiled and tried the code. I tried to add the #include that you told me in the files that makes me the problems, but it doesn't work either.

Then, I tried to delete all the references for cript in these files, and it compiles well. now I have to do again, because something with passwords don't work fine. It's probably that I deleted something that I didn't have to do.

thanks again.

antram
       
Post is unread #6 Aug 9, 2011, 8:05 pm
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

Err...you kinda need those crypt references, unless you don't want to use any sort of encryption in the codebase--which is fine, but you'll have a lot of work ahead of you ripping it all out of the code.

For reference, what codebase are you using? And, if you downloaded here, what version? If it's a codebase offered here, but an older version, I highly recommend downloading the newer version as it would most likely have fixes for all of this.
       
Post is unread #7 Aug 10, 2011, 4:39 pm   Last edited Aug 10, 2011, 4:42 pm by antram
Go to the top of the page
Go to the bottom of the page

antram
Apprentice
GroupMembers
Posts58
JoinedNov 22, 2010

Hello Aurin:

it isn't a codebase downloaded from here. I was looking for something about muds, snipets, codebases or something like that, and I discovered this. It's name's CalareyMUD 3.0, and it's based in Resort Mud.

This code has a lot of things witch I would like to include in other codebase, or if I can, complete this code. but it's very difficult for me, because I don't know to code it. I'm learning, but I'm a newbie yet.

I think that a mix of this codebase and another, would be a great codebase.

Thanks a lot again aurin,

Antram

P.S: Obviously, I only want to learn about mudding. Sorry for the coder of this codebase if he reads this.
       
Post is unread #8 Aug 10, 2011, 5:24 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

http://www.haslage.net/games/CBHQ/calarey/

Ntanel doesn't allow it to be distributed anywhere but from his own site.
       
Post is unread #9 Aug 10, 2011, 5:59 pm   Last edited Aug 10, 2011, 6:08 pm by Aurin
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

Ahh, yeah...you might want to stick with the official page for your questions, as they deal solely in that codebase and would be able to more easily help you.

Might be a good idea to download one of the codebases found on this site, as this is a more active community than I see on the CalareyMUD page. Then, once you get confident in things, you could go back to CalareyMUD if you so desire.
       
Post is unread #10 Aug 11, 2011, 8:31 am
Go to the top of the page
Go to the bottom of the page

antram
Apprentice
GroupMembers
Posts58
JoinedNov 22, 2010

Hello:

I found the codebase here:

http://www.mudbytes.net/index.php?a=files&cid=34

Then, I have some codebases downloaded from here, but most codebases are so simple, and I don't know how to add new characteristics. So, I look for codebases wich contains it, to try to learn from it and then add to another codebase as smaug, smaugfuss, some like that.

Antram

P.S: I only want to learn from mudding, but I don't know anybody who can help me in spain, so, I asked you. Please, be pacient with me. :)
       
Pages:<< prev 1 next >>