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 ➜ Trying to add a skill, details inside

Trying to add a skill, details inside

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


Pages: 1  2 

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #15 on Wed 21 Mar 2007 04:52 AM (UTC)
Message
These lines might also be problematic:
       obj->name = str_dup( ch->zname);
       obj->short_descr = str_dup( ch->zname);

The problem is that those are supposed to be hashed strings, so when free_obj comes along it'll be calling STRFREE -- but then it'll get really confused because you allocated them as normal strings using str_dup. You should use STRALLOC instead, or the more efficient QUICKLINK when you're just copying.)


(This is why I really hate the string hashing system, and wrote my own self-managing hashed strings instead. They're announced in the general programming section of this forum. They're in C++, though.)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

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

Posted by Kisuke   (10 posts)  Bio
Date Reply #16 on Wed 21 Mar 2007 12:51 PM (UTC)

Amended on Wed 21 Mar 2007 12:52 PM (UTC) by Kisuke

Message
I didn't add anything to objects. I added bname and zname as pointers to strings( char *zname, *bname ) in the char_data structure. Maybe this will help though. I've found two more issues, they may be related. One: when I try to log after logging out with one of the weapons wielded, it crashes the game. two: when i create the bankai for the first time and initialize bname in a char file, it also changes zname. again, i'm not sure why.


at this point, i'm thinking of reloading a fresh copy of fuss smaug and adding my changes over again, that way i can redo the zanpakutoh/bankai code from scratch.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #17 on Wed 21 Mar 2007 07:18 PM (UTC)
Message
That might be a good idea. If you do that, you should also keep a careful record of what you changed. One way to do that is to maintain a clean copy in parallel with your normal copy, and then, when you want to know what is different, you can just run the diff command.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
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.


61,253 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.