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 ➜ Adding a new obj string

Adding a new obj string

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


Pages: 1  2 

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #15 on Sat 09 Oct 2004 04:34 PM (UTC)

Amended on Sat 09 Oct 2004 04:40 PM (UTC) by Greven

Message
Is obj->pIndexData->name null? I don't see what that would cause a crash, though you can check that QUICKLINKS checks for null input.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #16 on Sat 09 Oct 2004 04:42 PM (UTC)

Amended on Sat 09 Oct 2004 04:47 PM (UTC) by Zeno

Message
Not sure.
(gdb) p obj->pIndexData->name
Cannot access memory at address 0x2c


Let me look over QUICKLINK

mud.h:#define QUICKLINK(point)  quick_link((point))
mud.h:#define QUICKLINK(point)  str_dup((point))


char *quick_link( char *str )
{
    register struct hashstr_data *ptr;

    ptr = (struct hashstr_data *) (str - sizeof(struct hashstr_data));
    if ( ptr->links == 0 )
    {
        fprintf(stderr, "quick_link: bad pointer\n" );
        return NULL;
    }
    if ( ptr->links < 65535 )
        ++ptr->links;
    return str;
}


This may be the problem:
(gdb) p *obj
$1 = {next = 0x0, prev = 0x0, next_content = 0x0, prev_content = 0x0, first_content = 0x0, last_content = 0x0,
  in_obj = 0x0, carried_by = 0x0, first_extradesc = 0x0, last_extradesc = 0x0, first_affect = 0x0, last_affect = 0x0,
  pIndexData = 0x0, in_room = 0x0, name = 0x0, short_descr = 0x0, description = 0x0, action_desc = 0x0, item_type = 0,
  mpscriptpos = 0, extra_flags = {bits = {0, 0, 0, 0}}, magic_flags = 0, wear_flags = 0, mpact = 0x0, mpactnum = 0,
  wear_loc = -1, weight = 1, cost = 0, level = 0, timer = 0, value = {0, 0, 0, 0, 0, 0}, count = 1, serial = 0,
  room_vnum = 0, ashards = 0,
  creator = 0x83a7770 "(null)\n\rVnum         1007\n\rLevel        115\n\rValues       10 10 0 0 0 0\n\rEnd\n\r\n\r#END\n\r"}

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

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #17 on Wed 20 Oct 2004 07:35 PM (UTC)
Message
Well I've had it working for a while. But a quick question. Adding a new object string, I had to go through all this. Yet I've added two new object variables, and it's fine. Why is this?

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

Posted by Mirrodan   USA  (28 posts)  Bio
Date Reply #18 on Thu 21 Oct 2004 07:36 AM (UTC)
Message
I'm trying to add a new room string would i need to do the same ?


Admin and Head Coder
For Techno-Magicka
techno-magicka.dreasphere.org 4000
AIM: tchnmgck
MSN: newell_everett@hotmail.com
YAHOO: everettnewell
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.


47,890 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.