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 ➜ Really need help this time.

Really need help this time.

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


Pages: 1  2 

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #15 on Wed 22 Jun 2005 04:31 AM (UTC)
Message
Simply comment out the old functions (or delete) and put the new ones in. They are in act_move.c as the error shows.

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

Posted by Manakra   (27 posts)  Bio
Date Reply #16 on Wed 22 Jun 2005 04:35 AM (UTC)

Amended on Wed 22 Jun 2005 04:37 AM (UTC) by Manakra

Message
Okay, got past Act_move, now I got Act_wiz, bigger problem now.

$ make
make -s smaug
Compiling o/act_move.o....
Compiling o/act_obj.o....
Compiling o/act_wiz.o....
act_wiz.c: In function `do_transfer':
act_wiz.c:1340: error: `Add' undeclared (first use in this function)
act_wiz.c:1340: error: (Each undeclared identifier is reported only once
act_wiz.c:1340: error: for each function it appears in.)
act_wiz.c:1340: error: parse error before "these"
act_wiz.c: At top level:
act_wiz.c:1346: error: parse error before "if"
act_wiz.c:1351: error: parse error before numeric constant
act_wiz.c:1354: error: parse error before string constant
act_wiz.c:1354: warning: type defaults to `int' in declaration of `do_look'
act_wiz.c:1354: error: conflicting types for `do_look'
mud.h:3798: error: previous declaration of `do_look'
act_wiz.c:1354: warning: redundant redeclaration of `do_look' in same scope
mud.h:3798: warning: previous declaration of `do_look'
act_wiz.c:1354: warning: data definition has no type or storage class
make[1]: *** [o/act_wiz.o] Error 1
make: *** [all] Error 2

(I so look stupid right now, dont I? )
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #17 on Wed 22 Jun 2005 04:37 AM (UTC)
Message
Were these errors here before you added furniture? Show me the lines around 1340.

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

Posted by Manakra   (27 posts)  Bio
Date Reply #18 on Wed 22 Jun 2005 04:39 AM (UTC)
Message
Nah, they weren't.


   {
      send_to_char( "They have no physical location!\n\r", ch );
      return;
   }
   /*
    * modification to prevent a low level imm from transferring a 
    */
   /*
    * higher level imm with the DND flag on.  - Gorog             
    */
   if( !IS_NPC( victim ) && get_trust( ch ) < get_trust( victim )
       && victim->desc
       && ( victim->desc->connected == CON_PLAYING
            || victim->desc->connected == CON_EDITING ) && IS_SET( victim->pcdata->flags, PCFLAG_DND ) )
   {
      pager_printf( ch, "Sorry. %s does not wish to be disturbed.\n\r", victim->name );
      pager_printf( victim, "Your DND flag just foiled %s's transfer command.\n\r", ch->name );
      return;
   }
   /*
    * end of modification                                         
    */

the stop is starting on 1339
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #19 on Wed 22 Jun 2005 04:42 AM (UTC)
Message
Are you sure?
act_wiz.c:1340: error: `Add' undeclared (first use in this function)

It seems like you missed a comment or quote. I do not see "Add" anywhere in the code you posted.

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

Posted by Manakra   (27 posts)  Bio
Date Reply #20 on Wed 22 Jun 2005 04:44 AM (UTC)

Amended on Wed 22 Jun 2005 04:47 AM (UTC) by Manakra

Message
I did a search for Add, and it said "Add this", so I killed it off, saved, compiled, and no errors o.0

Time to test it out, ^_^


Edit: It works, at least for sitting on the chair, THANKS for all your help, ^_^
Top

Posted by Manakra   (27 posts)  Bio
Date Reply #21 on Wed 22 Jun 2005 04:50 AM (UTC)
Message
On the side note, anyone feel like teaching my Bitvectors?

(if you look on hermes building guide, objects, then furniture values, he says "add them up" and it confuses me, ^_^ )
Top

Posted by Robert Powell   Australia  (367 posts)  Bio
Date Reply #22 on Wed 22 Jun 2005 06:31 AM (UTC)
Message
Add them up is what you do, take the following flags, and there bit values

flagA = 1
flagB = 2
flagC = 4

If you want a something to have flagA you would give it a value of 1, if you wanted something to have both flagA and flagB then you would add those values us and give it a value of 3, being flagA + flagB, or 1 + 2.

Bitvectors are funny little buggers that when added together give a result that can be broken back into the added parts and only those parts.


Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #23 on Wed 22 Jun 2005 08:45 AM (UTC)
Message
Bitvectors are called such because they work with binary math. If you express the flags in binary, they look like:

1 =      1
2 =     10
4 =    100
8 =   1000
16 = 10000
So, a bitvector is just taking the 32 bits of an integer and setting the numbers. For instance, if bit 1 is equal to 1, then flag 1 is set. It "so happens" (by the nature of binary - it is in fact no accident at all) that the decimal values are the sums of the flag numbers.

The most important property is that the only way to get, say, 7, with these flags, is by adding 1, 2 and 4. If you add 3 and 4, then since 3 is '1' and '10', you're really adding 1, 2 and 4. It's kind of like prime numbers, but for addition instead of multiplication. (If that last comment confused you, just ignore it. It probably makes sense only if you're familiar with the math of divisors, formal arithmetic etc.)

In any case, a bitvector in SMAUG is nothing more than a 32-bit number where you turn on or off specific bits. A decimal number, translated into binary, tells you which flags are turned on based on which digits are 1s.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Dralnu   USA  (277 posts)  Bio
Date Reply #24 on Fri 24 Jun 2005 08:58 PM (UTC)
Message
Speaking of prime numbers, and expounding on Ksilyan said, if you believe, I think its Godel's Prime Number Hypothesis/Theorem, that all numbers can be constructed from prime numbers, then thats alot like what it is, only with other numbers...


I feel like such a geek now...
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.


81,028 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

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.