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
➜ SMAUG coding
➜ Channels as extended bitvectors
Channels as extended bitvectors
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Vaelarin
USA (8 posts) Bio
|
Date
| Fri 07 Jun 2002 03:05 AM (UTC) |
Message
| I'm trying to change the channels from bitvectors to extended bitvectors. Everything worked ok, except for one line of code in save.c. I'm using smaug 1.4a, linux.
The snippet I'm using says to change this:
in fwrite_char:
if (ch->deaf )
fprintf( pf, "Deaf %d\n", ch->deaf );
into this:
if ( !xIS_EMPTY(ch->deaf) )
fprintf( fp, "Deaf %s\n", frpint_bitvector(&ch->deaf) );
which is what I did. However, when I try to compile, when it reaches save.c it gives this error:
implicit declaration of function 'fprint_bitvector'
warning format argument is not a pointer (arg3)
it continues, until it tries to build save.o, then it crashes and gives me this error:
In function `fwrite_char':
/home/username/dist/src/save.c:345: undefined reference to `fprint_bitvector'
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make[1]: Leaving directory `/home/username/dist/src'
make: *** [all] Error 2
any ideas? | Top |
|
Posted by
| Neves
USA (78 posts) Bio
|
Date
| Reply #1 on Fri 07 Jun 2002 03:16 AM (UTC) |
Message
| The original code was:
fprintf( pf, "Deaf %d\n", ch->deaf );
You changed it to:
fprintf( fp, "Deaf %s\n", frpint_bitvector(&ch->deaf) );
Comaparing them shows that one has pf, one fp, not sure if that makes a difference, but it might be worth changing just to see, and also you wrote frpint_bitvector, could be that it should be fprint_bitvector. These are just guesses, since I never worked much with that type of thing.
-Jay | Top |
|
Posted by
| Vaelarin
USA (8 posts) Bio
|
Date
| Reply #2 on Fri 07 Jun 2002 04:03 AM (UTC) |
Message
| ah, no those were typoes. Sorry. They are correct in the code, listed as:
if ( ch->deaf )
fprint( fp, "Deaf %d\n", ch->deaf);
and
if ( !xIS_EMPTY(ch->deaf) )
fprint( fp, "Deaf %s\n", fprint_bitvector(&ch->deaf) );
still having the errors... | Top |
|
Posted by
| Neves
USA (78 posts) Bio
|
Date
| Reply #3 on Fri 07 Jun 2002 04:55 AM (UTC) |
Message
| Only other thing I noticed was that when I searched through SMAUG code there is nowhere with fprint_bitvector, unless that was something you added, which might be what the problem is.
-Jay | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #4 on Fri 07 Jun 2002 10:56 PM (UTC) |
Message
| Looking at the source, it is "print_bitvector", not "fprint_bitvector". |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Vaelarin
USA (8 posts) Bio
|
Date
| Reply #5 on Sat 08 Jun 2002 02:23 PM (UTC) |
Message
| excellent, that took care of the problem. Thanks. | 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.
18,782 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top