Register forum user name Search FAQ

Gammon Forum

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 ➜ MIL undeclared?

MIL undeclared?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Zeno   USA  (2,871 posts)  Bio
Date Sun 09 May 2004 08:39 PM (UTC)
Message
After replacing color.c and color.h (see http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4134&page=999999 ) I went to do a clean recompile, and got this odd errors.



gcc -c  -O -g2 -Wall     -DI3 -DI3SMAUG act_wiz.c
act_wiz.c: In function `do_setclass':
act_wiz.c:7545: `MIL' undeclared (first use in this function)
act_wiz.c:7545: (Each undeclared identifier is reported only once
act_wiz.c:7545: for each function it appears in.)
act_wiz.c:7545: warning: unused variable `arg1'
act_wiz.c:7545: warning: unused variable `arg2'
act_wiz.c: In function `do_setrace':
act_wiz.c:7945: `MSL' undeclared (first use in this function)
act_wiz.c:7945: `MIL' undeclared (first use in this function)
act_wiz.c:7945: warning: unused variable `buf'
act_wiz.c:7945: warning: unused variable `arg1'
act_wiz.c:7945: warning: unused variable `arg2'
act_wiz.c:7945: warning: unused variable `arg3'
make[1]: *** [act_wiz.o] Error 1


I never touched do_setclass at all. Here's some lines.

void do_setclass( CHAR_DATA *ch, char *argument )
{
  char arg1[MIL], arg2[MIL];
  FILE *fpList;
  char classlist[256];
  struct class_type *class;
  int cl, value, i;


Also those unused variables were never there before... I don't see why act_wiz.c just suddenly does this... Any idea why? And is that part of the code stock code?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Meerclar   USA  (733 posts)  Bio
Date Reply #1 on Sun 09 May 2004 08:54 PM (UTC)
Message
Sounds like you didnt close the brackets in the function above do_setclass properly.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #2 on Sun 09 May 2004 08:56 PM (UTC)

Amended on Sun 09 May 2004 08:57 PM (UTC) by Zeno

Message

bool create_new_class( int index, char *argument )
{
  int i;

  if ( index >= MAX_CLASS || class_table[index] == NULL )
        return FALSE;
  if ( class_table[index]->who_name )
        STRFREE( class_table[index]->who_name );
  if ( argument[0] != '\0' )
        argument[0] = UPPER(argument[0]);
  class_table[index]->who_name = STRALLOC( argument );
  xCLEAR_BITS( class_table[index]->affected );
  class_table[index]->attr_prime = 0;
  class_table[index]->attr_second = 0;
  class_table[index]->attr_deficient = 0;
  class_table[index]->resist = 0;
  class_table[index]->suscept = 0;
  class_table[index]->weapon = 0;
  class_table[index]->guild = 0;
  class_table[index]->skill_adept = 0;
  class_table[index]->thac0_00 = 0;
  class_table[index]->thac0_32 = 0;
  class_table[index]->hp_min = 0;
  class_table[index]->hp_max = 0;
  class_table[index]->fMana = FALSE;
  class_table[index]->exp_base = 0;
  for ( i=0; i< MAX_LEVEL;i++ )
  {
        title_table[index][0] = str_dup( "Not set." );
        title_table[index][1] = str_dup( "Not set." );
  }
  return TRUE;
}

/*
* Edit class information     -Thoric
*/
void do_setclass( CHAR_DATA *ch, char *argument )
{


Looks fine to me. (Stupid forum code)

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Samson   USA  (683 posts)  Bio
Date Reply #3 on Sun 09 May 2004 09:13 PM (UTC)
Message
BAsically you have an older copy of the FUSS code. The bug you've got was later fixed by the updated do_setclass and do_setrace fixes. You need to replace the entirety of both functions to fix that.
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #4 on Sun 09 May 2004 09:30 PM (UTC)
Message
Alright. But why get the errors now? color.c and color.h had something to do with it?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #5 on Mon 10 May 2004 07:20 AM (UTC)
Message
Quote:

Looks fine to me. (Stupid forum code)


If you look at the actual text you have [i] in it, which means italics. Use the MUSHclient notepad "quote forum codes" function, or if you don't want to do that, use an editor to change:


\ to \\
[ to \[
] to \]

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #6 on Mon 10 May 2004 11:24 AM (UTC)
Message
Ah, I didn't even know MUSHclient had that.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Samson   USA  (683 posts)  Bio
Date Reply #7 on Tue 11 May 2004 12:58 AM (UTC)
Message
Zeno, yes. color.h had a holdover definition of MIL I had forgotten about and when it finally got removed it revealed the fix for the act_wiz.c stuff was relying on it. That and a couple of other things I've now forgotten about had the same issue. The FUSS packages on the download site here shouldn't have that problem.
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.


20,664 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.