Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Yahoo!

Members: 0
Guests: 6
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Coding » Adding lockers
Forum Rules | Mark all | Recent Posts

Adding lockers
< Newer Topic :: Older Topic > http://www.shadow-lands.com/snippet

Pages:<< prev 1 next >>
Post is unread #1 Jul 28, 2002, 9:11 am
Go to the top of the page
Go to the bottom of the page

Guest - (Unregistered)

Hey guys,

I have successfully added the lockers snippet to my mud except with this point.

It will open and close with
locker open
locker close
commands

However if you try to open it immediately after it crashes mud with the following core: It has something to do with do_look, but I dont know why when it lets you open the locker the first time.

Sun Jul 28 08:45:26 PDT 2002
Core was generated by `../src/smaug 5050'.
Program terminated with signal 11, Segmentation fault.
#0 0x400cc636 in chunk_free (ar_ptr=0x401802a0, p=0x85576f8) at malloc.c:3242
in malloc.c
#0 0x400cc636 in chunk_free (ar_ptr=0x401802a0, p=0x85576f8) at malloc.c:3242
#1 0x400cc3e4 in libc_start_main (main=0x80a3fe8 , argc=2,
ubp_av=0xbfffdf34, init=0x8049060 , fini=0x814a350 ,
rtld_fini=0x4000dcd4 , stack_end=0xbfffdf2c)
at ../sysdeps/generic/libc-start.c:129
#0 0x400cc636 in chunk_free (ar_ptr=0x401802a0, p=0x85576f8) at malloc.c:3242
3242 in malloc.c
3237 in malloc.c
hd = 543516513
       
Post is unread #2 Jul 28, 2002, 9:26 am
Go to the top of the page
Go to the bottom of the page

Guest - (Unregistered)

Found a sorta solution.

I added smalloc.c cause apparantly malloc.c sucks.

Lockers work great now, but....

I get these warnings in smalloc.c for some reason

make -s smaug
Compiling o/smalloc.o....
smalloc.c:391: warning: return type defaults to `int'
smalloc.c:417: warning: return type defaults to `int'
smalloc.c: In function `mstats':
smalloc.c:438: warning: control reaches end of non-void function
Done compiling Call to Arms
       
Post is unread #3 Jul 29, 2002, 5:49 am
Go to the top of the page
Go to the bottom of the page

Guest - (Unregistered)

smalloc.c:391: warning: return type defaults to `int'
smalloc.c:417: warning: return type defaults to `int'

Functions have been defined without any return type decleration, where you'd normally have "int func()" or "void func()" its got just "func()".

As it states default is to just default to an int return type.

smalloc.c: In function `mstats':
smalloc.c:438: warning: control reaches end of non-void function
Done compiling Call to Arms


Probably one of these funcs without a return type, which now is supposed to return an int (the default return type), has a return without a variable or has reached the end of the function without a return at all, where it was expecting you to return an int.

Only a warning as its not always fatal, depending on your code logic and if you deal with the return value (if there is supposed to be one).
       
Pages:<< prev 1 next >>