Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, DotBot

Members: 0
Guests: 4
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Coding » Calareymud loadarea crash
Forum Rules | Mark all | Recent Posts

Calareymud loadarea crash
< Newer Topic :: Older Topic >

Pages:<< prev 1, 2, 3, 4, 5 ... next >>
Post is unread #41 Aug 4, 2013, 5:05 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

mind getting the "print room->vnum" while in gdb

and heres the issue in comm.c
comm.c: In function ânew_descriptorâ:
comm.c:845: warning: pointer targets in passing argument 3 of âacceptâ differ in signedness
/usr/include/sys/socket.h:214: note: expected âsocklen_t * __restrict__â but argument is of type âint *â

at the top of the function
find
   int size;

change it to
   socklen_t size;

       
Post is unread #42 Aug 4, 2013, 5:06 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

heres the ones they are covered in.

Remcon said:

<br />
 Now compiling... o/makeobjs.o
<br />
makeobjs.c: In function âgenerate_mobâ:
<br />
makeobjs.c:632: warning: format not a string literal and no format arguments
<br />

<br />
find
<br />
<br />
   sprintf( buf, nation->name );
<br />

<br />
change it to
<br />
<br />
   snprintf( buf, sizeof( buf ), "%s", nation->name );
<br />

<br />

<br />
<br />
comm.c: In function âdisplay_promptâ:
<br />
comm.c:3108: warning: format not a string literal and no format arguments
<br />

<br />
find
<br />
<br />
                     sprintf( pbuf, ch->nation->name );
<br />

<br />
change it to
<br />
<br />
                     snprintf( pbuf, sizeof( pbuf ), "%s", ch->nation->name );
<br />

<br />

<br />
<br />
combat.c: In function âcheck_hitâ:
<br />
combat.c:536: warning: format not a string literal and no format arguments
<br />

<br />
find
<br />
<br />
   sprintf( buf, part_locs[part->loc] );
<br />

<br />
change it to
<br />
<br />
   snprintf( buf, sizeof( buf ), "%s", part_locs[part->loc] );
<br />

<br />

<br />
<br />
act_info.c: In function âformat_obj_to_charâ:
<br />
act_info.c:127: warning: format not a string literal and no format arguments
<br />

<br />
find
<br />
<br />
      sprintf( buf, aoran( buf ) );
<br />

<br />
change it to
<br />
<br />
      snprintf( buf, sizeof( buf ), "%s", aoran( buf ) );
<br />

<br />

<br />
<br />
act_info.c: In function âformat_obj_to_charâ:
<br />
act_info.c:148: warning: format not a string literal and no format arguments
<br />

<br />
find
<br />
<br />
      sprintf( buf, capitalize( aoran( buf ) ) );
<br />

<br />
change it to
<br />
<br />
      snprintf( buf, sizeof( buf ), "%s", capitalize( aoran( buf ) ) );
<br />

<br />
thats the ones that aren't in the QUICKMATCH. but let me know what you have on like save.c line 604 and what both the QUICKMATCH defines look like in mud.h when you get time.
       
Post is unread #43 Aug 4, 2013, 5:24 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

hashstr.c: In function âhash_dumpâ:
hashstr.c:258: warning: cast from pointer to integer of different size
hashstr.c:258: warning: cast to pointer from integer of different size

find
str = ( char * )( ( ( int )ptr ) + psize );

change it to
str = ( char * )( ( ( long )ptr ) + psize );


hashstr.c: In function âshow_high_hashâ:
hashstr.c:375: warning: cast from pointer to integer of different size
hashstr.c:375: warning: cast to pointer from integer of different size

find
str = ( char * )( ( ( int )ptr ) + psize );

change it to
str = ( char * )( ( ( long )ptr ) + psize );

let me know if there are any others lol
       
Post is unread #44 Aug 4, 2013, 5:42 pm   Last edited Aug 4, 2013, 5:48 pm by mystickdreamer
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

Here is the print room


(gdb) print room->vnum
Cannot access memory at address 0xe8
(gdb)




Wow I can't believe I missed that I'm sorry for making you repost something.



No more warnings .... just have to get rid of this crash


I also tried to run it just by the rmexe and this is what I got if that helps


./rmexe 6501
Sun Aug  4 17:41:51 2013 :: Booting Database
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Sun Aug  4 17:41:51 2013 :: [*****] BOOT: ---------------------[ Boot Log ]--------------------
Sun Aug  4 17:41:51 2013 :: Loading commands
Sun Aug  4 17:41:51 2013 :: Loading sysdata configuration...
Sun Aug  4 17:41:51 2013 :: Loading socials
Sun Aug  4 17:41:51 2013 :: Loading skill table
Sun Aug  4 17:41:51 2013 :: Sorting skill table...
Sun Aug  4 17:41:51 2013 :: Remapping slots to sns
Sun Aug  4 17:41:51 2013 :: Loading herb table
Sun Aug  4 17:41:51 2013 :: Loading clans
Sun Aug  4 17:41:51 2013 :: Loading channels
Sun Aug  4 17:41:51 2013 :: Loading bits
Sun Aug  4 17:41:51 2013 :: Loading help files
Sun Aug  4 17:41:51 2013 :: Loading books
Sun Aug  4 17:41:51 2013 :: Initializing random number generator
Sun Aug  4 17:41:51 2013 :: Setting time and weather
Sun Aug  4 17:41:51 2013 :: Assigning gsn's
ASSIGN_GSN: Skill poison weapon not found.
ASSIGN_GSN: Skill scribe not found.
ASSIGN_GSN: Skill brew not found.
ASSIGN_GSN: Skill disease not found.
ASSIGN_GSN: Skill weaken not found.
ASSIGN_GSN: Skill transmutation not found.
ASSIGN_GSN: Skill charm person not found.
ASSIGN_GSN: Skill counterspell not found.
ASSIGN_GSN: Skill sharpen not found.
Sun Aug  4 17:41:51 2013 :: Loading nations
Sun Aug  4 17:41:51 2013 :: Loading cities
Sun Aug  4 17:41:51 2013 :: Reading in area files...
area.lst: No such file or directory

I know it says there is no area.lst file or directory and I have checked to make sure it is there, and it is.



oh and here is save.c line 604
   if( ( QUICKMATCH( obj->name, obj->pIndexData->name ) ) == 0 )


and here are the QUICKMATCH defines in mud.h

#ifdef HASHSTR
#define STRALLOC(point)		str_alloc((point))
#define QUICKLINK(point)	quick_link((point))
#define QUICKMATCH(p1, p2)	( (p1) == (p2) )
#define STRFREE(point)						\
do								\
{								\
    if ((point) && str_free((point))==-1) 			\
      fprintf( stderr, "STRFREEing bad pointer in %s, line %d\n", __FILE__, __LINE__ ); \
    point = NULL;							\
} while(0)
#else
#define STRALLOC(point)		str_dup((point))
#define QUICKLINK(point)	str_dup((point))
#define QUICKMATCH(p1, p2)	strcmp((p1), (p2)) == 0
#define STRFREE(point)		
       
Post is unread #45 Aug 4, 2013, 5:50 pm   Last edited Aug 4, 2013, 5:51 pm by Remcon
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

if you want to run it from the rmexe go to the cm3/area directory and then type ../src/rmexe 6501
       
Post is unread #46 Aug 4, 2013, 5:54 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

at least done with the warnings. open up objects.dat in your system directory and look for these and make sure your mud has the rooms specified if not just remove it from the list in objects.dat and save it then try starting it up. (granted it should be protected from crashing it later)
#OBJECT
Vnum         20013
Room         20160
Condition	500000
Values       0 0 0 0 0 0 10
End

and
#OBJECT
Vnum         20013
Room         17088
Condition	500000
Values       0 0 0 0 0 0 10
End

       
Post is unread #47 Aug 4, 2013, 5:58 pm
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

../src/rmexe 6501
Sun Aug  4 17:57:31 2013 :: Booting Database
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: ---------------------[ Boot Log ]--------------------
Sun Aug  4 17:57:31 2013 :: Loading commands
Sun Aug  4 17:57:31 2013 :: Loading sysdata configuration...
Sun Aug  4 17:57:31 2013 :: Loading socials
Sun Aug  4 17:57:31 2013 :: Loading skill table
Sun Aug  4 17:57:31 2013 :: Sorting skill table...
Sun Aug  4 17:57:31 2013 :: Remapping slots to sns
Sun Aug  4 17:57:31 2013 :: Loading herb table
Sun Aug  4 17:57:31 2013 :: Loading clans
Sun Aug  4 17:57:31 2013 :: Loading channels
Sun Aug  4 17:57:31 2013 :: Loading bits
Sun Aug  4 17:57:31 2013 :: Loading help files
Sun Aug  4 17:57:31 2013 :: Loading books
Sun Aug  4 17:57:31 2013 :: Initializing random number generator
Sun Aug  4 17:57:31 2013 :: Setting time and weather
Sun Aug  4 17:57:31 2013 :: Assigning gsn's
ASSIGN_GSN: Skill poison weapon not found.
ASSIGN_GSN: Skill scribe not found.
ASSIGN_GSN: Skill brew not found.
ASSIGN_GSN: Skill disease not found.
ASSIGN_GSN: Skill weaken not found.
ASSIGN_GSN: Skill transmutation not found.
ASSIGN_GSN: Skill charm person not found.
ASSIGN_GSN: Skill counterspell not found.
ASSIGN_GSN: Skill sharpen not found.
Sun Aug  4 17:57:31 2013 :: Loading nations
Sun Aug  4 17:57:31 2013 :: Loading cities
Sun Aug  4 17:57:31 2013 :: Reading in area files...
limbo.are     : Rooms:     1 - 8     Objs:     2 - 99    Mobs:     1 - 25
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: stockobj.are (1) 'O': object 21013 doesn't exist.
stockobj.are  : Rooms: 29000 - 29000 Objs: 28900 - 29999 Mobs:     0 - 0
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (3) 'M': mobile 17012 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (4) 'M': mobile 17004 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (5) 'M': mobile 18302 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (14) 'M': mobile 18301 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (16) 'M': mobile 17003 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (25) 'O': object 17199 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (37) 'O': object 201 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (42) 'O': object 9006 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (43) 'M': mobile 17005 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (44) 'M': mobile 18700 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (45) 'M': mobile 17002 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (47) 'M': mobile 19402 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (48) 'M': mobile 17003 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (50) 'M': mobile 17006 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (55) 'O': object 17110 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (56) 'M': mobile 17001 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (58) 'M': mobile 17003 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (61) 'O': object 17100 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (62) 'M': mobile 17003 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (63) 'O': object 18701 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (64) 'M': mobile 18302 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (66) 'M': mobile 19402 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (67) 'G': object 19996 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (77) 'M': mobile 17010 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (78) 'M': mobile 17010 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (79) 'M': mobile 17002 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (80) 'M': mobile 17010 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: elkandu.are (81) 'M': mobile 17003 doesn't exist.
elkandu.are   : Rooms: 20000 - 20199 Objs: 20001 - 21001 Mobs: 20000 - 20099
gmaze.are     : Rooms:  9000 - 9074  Objs:  9000 - 9006  Mobs:     0 - 0
Sun Aug  4 17:57:31 2013 :: [*****] FILE: jaston.are LINE: 2142
Sun Aug  4 17:57:31 2013 :: [*****] BUG: load_resets: 'D': exit 2 not door.
Sun Aug  4 17:57:31 2013 :: [*****] FILE: jaston.are LINE: 2142
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Reset: D 0 17024 2 2
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: jaston.are (3) 'D': exit 2 not door.
Sun Aug  4 17:57:31 2013 :: [*****] FILE: jaston.are LINE: 2143
Sun Aug  4 17:57:31 2013 :: [*****] BUG: load_resets: 'D': exit 1 not door.
Sun Aug  4 17:57:31 2013 :: [*****] FILE: jaston.are LINE: 2143
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Reset: D 0 17040 1 0
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: jaston.are (4) 'D': exit 1 not door.
Sun Aug  4 17:57:31 2013 :: [*****] FILE: jaston.are LINE: 2144
Sun Aug  4 17:57:31 2013 :: [*****] BUG: load_resets: 'D': exit 0 not door.
Sun Aug  4 17:57:31 2013 :: [*****] FILE: jaston.are LINE: 2144
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Reset: D 0 17064 0 0
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: jaston.are (5) 'D': exit 0 not door.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: jaston.are (19) 'M': mobile 18700 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: jaston.are (21) 'M': mobile 18303 doesn't exist.
jaston.are    : Rooms: 17000 - 17099 Objs: 17000 - 17099 Mobs: 17001 - 17050
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: school.are (1) 'M': mobile 20003 doesn't exist.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: load_resets: school.are (3) 'O': object 27999 doesn't exist.
school.are    : Rooms:   100 - 199   Objs:     0 - 0     Mobs:     0 - 0
Sun Aug  4 17:57:31 2013 :: Loading high scores...
Sun Aug  4 17:57:31 2013 :: Fixing exits
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Get_room_index: bad vnum 11012.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: Fix_exits: room 17016, exit east leads to bad vnum (11012)
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Deleting east exit in room 17016
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Get_room_index: bad vnum 11000.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: Fix_exits: room 17018, exit north leads to bad vnum (11000)
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Deleting north exit in room 17018
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Get_room_index: bad vnum 11011.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: Fix_exits: room 17018, exit east leads to bad vnum (11011)
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Deleting east exit in room 17018
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Get_room_index: bad vnum 11011.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: Fix_exits: room 17019, exit north leads to bad vnum (11011)
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Deleting north exit in room 17019
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Get_room_index: bad vnum 11012.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: Fix_exits: room 17019, exit south leads to bad vnum (11012)
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Deleting south exit in room 17019
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Get_room_index: bad vnum 11012.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: Fix_exits: room 17020, exit north leads to bad vnum (11012)
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Deleting north exit in room 17020
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Get_room_index: bad vnum 18595.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: Fix_exits: room 17049, exit south leads to bad vnum (18595)
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Deleting south exit in room 17049
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Get_room_index: bad vnum 17200.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: Fix_exits: room 17070, exit west leads to bad vnum (17200)
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Deleting west exit in room 17070
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Get_room_index: bad vnum 17900.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: Fix_exits: room 17083, exit east leads to bad vnum (17900)
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Deleting east exit in room 17083
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Get_room_index: bad vnum 18599.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: Fix_exits: room 17091, exit down leads to bad vnum (18599)
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Deleting down exit in room 17091
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Get_room_index: bad vnum 17721.
Sun Aug  4 17:57:31 2013 :: [*****] BOOT: Fix_exits: room 9001, exit east leads to bad vnum (17721)
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Deleting east exit in room 9001
Sun Aug  4 17:57:31 2013 :: Initializing economy
Sun Aug  4 17:57:31 2013 :: Loading materials
Sun Aug  4 17:57:31 2013 :: Loading world
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Create_mobile: NULL pMobIndex.
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Fread_mobile: No index data for vnum 10000
Sun Aug  4 17:57:31 2013 :: [*****] BUG: fread_word: EOF encountered on read.

Sun Aug  4 17:57:31 2013 :: [*****] BUG: Extract_char: NULL ch.
Sun Aug  4 17:57:31 2013 :: [*****] BUG: Fread_mobile: Vnum not found
Segmentation fault
       
Post is unread #48 Aug 4, 2013, 6:01 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

Yea your crash is in the loading of objects in objects.dat in the system directory
       
Post is unread #49 Aug 4, 2013, 6:11 pm   Last edited Aug 4, 2013, 6:28 pm by mystickdreamer
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

EDIT:


Ok I don't know why, but I keep missing posts. Going back and read some now
       
Post is unread #50 Aug 4, 2013, 6:27 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

in save.c line 1984
find
                  if( os_type == OS_GROUND && room )
                  {
                     obj_to_room( obj, room );
                  }

change it to
                  if( os_type == OS_GROUND )
                  {
                     if( !room )
                     {
                        bug( "%s: room is NULL on OS_GROUND for obj->pIndexData->vnum %d", __FUNCTION__, obj->pIndexData->vnum );
                        extract_obj( obj );
                        return;
                     }
                     obj_to_room( obj, room );
                  }

was just working on that, this seems to stop the crashing from it just fine.
       
Post is unread #51 Aug 4, 2013, 6:36 pm
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

I edited my last post apparently I was missing posts for some reason


the two objects do have rooms although they don't have the line values


ok that brought the mud back up and running


thank you so much...


lets see if I can crash it again lol



You are a wonder Remcon, and if I may say so a very patient person.

       
Post is unread #52 Aug 4, 2013, 6:45 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

yw, no worries sometimes i would get 2 or more post in before you checked :)
       
Post is unread #53 Aug 4, 2013, 6:49 pm
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

maybe if you don't mind you can help me with something that may or may not be code related



I'm trying to create a shop, but I can't set the owner, gold, salary or room


and then there is the ability to create matshops, which I'm guessing are material shops


I'm thinking the makeshop was for player shops and the matshops is the normal shop types


but when I try and make a matshop all I get is it saying Nothing Happens


could you give me some insight on this?
       
Post is unread #54 Aug 4, 2013, 7:24 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

found in do_matshop in build.c it has
   if( ch->curr_talent[TAL_CHANGE] < 102 )
   {
      send_to_char( "Nothing happens.\n\r", ch );
      return;
   }

so thats why you cant mess with it.

You should be able to use makeshop and shopset to set up the normal ones, what do you see when you try?
       
Post is unread #55 Aug 4, 2013, 7:36 pm
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

I'll give you some examples


> shopset
Build: Admin: shopset
Usage: shopset <field> value

Field being one of:
  room salary sell type flag owner gold


> shopset room 10007
Build: Admin: shopset room 10007
Room not found.
> 

The room 10007 is the correct room

> shopset owner postmaster
Build: Admin: shopset owner postmaster
Done.
> shopstat
Room: [10007] The Post
Profit:  Salary  90%  Sell 100%  Vault: 0m 0g 0s 0c
The owner of this shop is (for sale).
This shop will sell any items.
> 

> shopset owner 10007
Build: Admin: shopset owner 10007
Done.
> shopstat
Room: [10007] The Post
Profit:  Salary  90%  Sell 100%  Vault: 0m 0g 0s 0c
The owner of this shop is (for sale).
This shop will sell any items.
> 

> shopset gold 1000
Build: Admin: shopset gold 1000
Usage: shopset <field> value

Field being one of:
  room salary sell type flag owner gold
> 




and I haven't been able to find what flags go with the shop
       
Post is unread #56 Aug 4, 2013, 7:46 pm   Last edited Aug 4, 2013, 7:47 pm by mystickdreamer
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

ah and something else I noticed is this is what is in my inventory now


You are carrying:
an a (x 2)
> drop all
You drop the bag of holding.
You drop the quill.
> look
[10005] Standing in City Building
This building has high ceilings and the floor is made of marble. There
is a sign here. Don't forget to LEAVE when your business is concluded.
Torrents of pure mana pour from above. A few lights scattered around
provide lighting.
Obvious exits:
[10007] East - The Post
[10006] West - Bank Teller
A bag of holding is here.
A quill is here.
A bucket of solvent for trash is here.
[10001] A invisible, a newly created Janitor is standing here.



and when I give something to a player


< 5000/5000hp 2500/2500m 2500/2500ep >
Admin gives you a loaf of bread.

< 5000/5000hp 2500/2500m 2500/2500ep > inv
You are carrying:
an a
       
Post is unread #57 Aug 4, 2013, 8:12 pm
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

oh and here is something else I have that gave me the idea matshops were regular shops


> list
Log: [*****] BUG: No matshop exist in find_matshop.
There is nothing for sale here.



this happens in the shop I just made and a stock shop
       
Post is unread #58 Aug 4, 2013, 8:22 pm   Last edited Aug 4, 2013, 8:28 pm by mystickdreamer
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

but as for as the matshop goes I did this



if( !IS_SET( ch->pcdata->permissions, PERMIT_HIBUILD ) )
{
send_to_char( "Nothing happens.\n\r", ch );
return;
}


and it seems that I can know make matshops while PCs cannot




although I was wrong a matshop is a materials shop
       
Post is unread #59 Aug 4, 2013, 8:24 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

find
void do_shopset( CHAR_DATA * ch, char *argument ) 
{
   
SHOP_DATA * shop;
   
ROOM_INDEX_DATA * room, *room2;
   
char arg1[MAX_INPUT_LENGTH];
   
int vnum, value;
   
if( IS_NPC( ch ) )
   {
      
huh( ch );
      
return;
   
}
   
argument = one_argument( argument, arg1 );
   
if( arg1[0] == '\0' )
      
   {
      
send_to_char( "Usage: shopset <field> value\n\r", ch );
      
send_to_char( "\n\rField being one of:\n\r", ch );
      
if( IS_SET( ch->pcdata->permissions, PERMIT_HIBUILD ) )
         
send_to_char( "  room salary sell type flag owner gold\n\r", ch );
      
      else
         
send_to_char( "  sell salary\n\r", ch );
      
return;
   
}
   
vnum = atoi( arg1 );
   
room = ch->in_room;
   
if( !room->pShop )
      
   {
      
send_to_char( "This room doesn't keep a shop.\n\r", ch );
      
return;
   
}
   
shop = room->pShop;
   
value = atoi( argument );
   
if( !str_cmp( arg1, "sell" ) 
         &&( IS_SET( ch->pcdata->permissions, PERMIT_HIBUILD ) 
 ||!str_cmp( ch->name, shop->owner ) ) )
      
   {
      
if( value < 0 )
         
      {
         
send_to_char( "Out of range.\n\r", ch );
         
return;
      
}
      
shop->profit_sell = value;
      
send_to_char( "The selling profit for this shop has been changed.\n\r", ch );
      
fold_area( ch->in_room->area, ch->in_room->area->filename, FALSE );
      
return;
   
}
   
if( !str_cmp( arg1, "salary" ) 
         &&( IS_SET( ch->pcdata->permissions, PERMIT_HIBUILD ) 
 ||!str_cmp( ch->name, shop->owner ) ) )
      
   {
      
if( shop->gold && !IS_SET( ch->pcdata->permissions, PERMIT_HIBUILD ) )
      {
         
send_to_char
            ( "You can't change your shopkeeper's salary with money in the vault.\n\rWithdraw first, then change it.\n\r",
              ch );
         
return;
      
}
      
if( value < 0 || value > 100 )
         
      {
         
send_to_char( "Out of range.\n\r", ch );
         
return;
      
}
      
shop->profit_buy = value;
      
send_to_char( "The salary for this shopkeeper has been changed.\n\r", ch );
      
fold_area( ch->in_room->area, ch->in_room->area->filename, FALSE );
      
return;
   
}
   
if( !IS_SET( ch->pcdata->permissions, PERMIT_HIBUILD ) )
   {
      
send_to_char( "Invalid option.\n\r", ch );
      
return;
   
}
   
if( !str_cmp( arg1, "type" ) )
      
   {
      
if( !str_cmp( argument, "none" ) )
      {
         
shop->flag = -1;
      
}
      else
      {
         
if( !is_number( argument ) )
            
value = get_otype( argument );
         
if( value < 0 || value > MAX_ITEM_TYPE )
            
         {
            
send_to_char( "Invalid item type.\n\r", ch );
            
return;
         
}
         
shop->type = value;
      
}
      
send_to_char( "Done.\n\r", ch );
      
return;
   
}
   
if( !str_cmp( arg1, "flag" ) )
      
   {
      
if( !str_cmp( argument, "none" ) )
      {
         
shop->flag = -1;
      
}
      else
      {
         
value = get_oflag( argument );
         
if( value < 0 || value > MAX_BITS )
         {
            
send_to_char( "Invalid flag.\n\r", ch );
            
return;
         
}
         
shop->flag = value;
      
}
      
send_to_char( "Done.\n\r", ch );
      
return;
   
}
   
if( !str_cmp( arg1, "owner" ) )
      
   {
      
STRFREE( shop->owner );
      
shop->owner = STRALLOC( argument );
      
send_to_char( "Done.\n\r", ch );
      
return;
   
}
   
      /*
       * This doesn't work right now for some reason 
       */ 
      if( !str_cmp( arg1, "room" ) )
      
   {
      
if( ( room2 = get_room_index( vnum ) ) == NULL )
         
      {
         
send_to_char( "Room not found.\n\r", ch );
         
return;
      
}
      
if( room2->pShop )
         
      {
         
send_to_char( "That room already has a shop.\n\r", ch );
         
return;
      
}
      
room->pShop = NULL;
      
room2->pShop = shop;
      
shop->room = value;
      
send_to_char( "Done.\n\r", ch );
      
return;
   
}
   
do_shopset( ch, "" );
   
return;

}

change it to
void do_shopset( CHAR_DATA * ch, char *argument ) 
{
   SHOP_DATA *shop;
   ROOM_INDEX_DATA * room, *room2;
   char arg1[MAX_INPUT_LENGTH];
   int value;

   if( IS_NPC( ch ) )
   {
      huh( ch );
      return;
   }

   argument = one_argument( argument, arg1 );

   if( arg1[0] == '\0' )
   {
      send_to_char( "Usage: shopset <field> value\n\r", ch );
      send_to_char( "\n\rField being one of:\n\r", ch );
      if( IS_SET( ch->pcdata->permissions, PERMIT_HIBUILD ) )
         send_to_char( "  room salary sell type flag owner gold\n\r", ch );
      else
         send_to_char( "  sell salary\n\r", ch );
      return;
   }

   if( !( room = ch->in_room ) )
   {
      send_to_char( "You aren't in a room?\n\r", ch );
      return;
   }

   if( !( shop = room->pShop ) )
   {
      send_to_char( "This room doesn't keep a shop.\n\r", ch );
      return;
   }

   value = atoi( argument );

   if( !str_cmp( arg1, "sell" ) 
   && ( IS_SET( ch->pcdata->permissions, PERMIT_HIBUILD ) ||!str_cmp( ch->name, shop->owner ) ) )
   {
      if( value < 0 )
      {
         send_to_char( "Out of range.\n\r", ch );
         return;
      }

      shop->profit_sell = value;
      send_to_char( "The selling profit for this shop has been changed.\n\r", ch );
      fold_area( room->area, room->area->filename, FALSE );
      return;
   }
   
   if( !str_cmp( arg1, "salary" ) 
   && ( IS_SET( ch->pcdata->permissions, PERMIT_HIBUILD ) ||!str_cmp( ch->name, shop->owner ) ) )
   {
      if( shop->gold && !IS_SET( ch->pcdata->permissions, PERMIT_HIBUILD ) )
      {
         send_to_char( "You can't change your shopkeeper's salary with money in the vault.\n\rWithdraw first, then change it.\n\r", ch );
         return;
      }

      if( value < 0 || value > 100 )
      {
         send_to_char( "Out of range.\n\r", ch );
         return;
      }

      shop->profit_buy = value;
      send_to_char( "The salary for this shopkeeper has been changed.\n\r", ch );
      fold_area( room->area, room->area->filename, FALSE );
      return;
   }

   if( !IS_SET( ch->pcdata->permissions, PERMIT_HIBUILD ) )
   {
      send_to_char( "Invalid option.\n\r", ch );
      return;
   }

   if( !str_cmp( arg1, "type" ) )
   {
      if( !str_cmp( argument, "none" ) )
      {
         shop->flag = -1;
      }
      else
      {
         if( !is_number( argument ) )
            value = get_otype( argument );

         if( value < 0 || value > MAX_ITEM_TYPE )
         {
            send_to_char( "Invalid item type.\n\r", ch );
            return;
         }

         shop->type = value;
      }

      ch_printf( ch, "Shop %d type set to %d.\n\r", shop->room, shop->type );
      fold_area( room->area, room->area->filename, FALSE );
      return;
   }

   if( !str_cmp( arg1, "flag" ) )
   {
      if( !str_cmp( argument, "none" ) )
      {
         shop->flag = -1;
      }
      else
      {
         value = get_oflag( argument );

         if( value < 0 || value > MAX_BITS )
         {
            send_to_char( "Invalid flag.\n\r", ch );
            return;
         }

         shop->flag = value;
      }

      ch_printf( ch, "Shop %d flag set to %d.\n\r", shop->room, shop->flag );
      fold_area( room->area, room->area->filename, FALSE );
      return;
   }

   if( !str_cmp( arg1, "owner" ) )
   {
      if( shop->owner )
         STRFREE( shop->owner );
      shop->owner = STRALLOC( argument );

      ch_printf( ch, "Shop %d owner set to %s.\n\r", shop->room, shop->owner ? shop->owner : "(Unknown)" );
      fold_area( room->area, room->area->filename, FALSE );
      return;
   }

   /* This doesn't work right now for some reason */ 
   if( !str_cmp( arg1, "room" ) )
   {
      if( ( room2 = get_room_index( value ) ) == NULL )
      {
         ch_printf( ch, "Room %d not found to use.\n\r", value );
         return;
      }

      if( room2->pShop )
      {
         ch_printf( ch, "Room %d already has a shop.\n\r", room2->vnum );
         return;
      }

      room->pShop = NULL;
      room2->pShop = shop;
      shop->room = value;
      ch_printf( ch, "Shop %d is now Shop %d.\n\r", room->vnum, shop->room );
      fold_area( room->area, room->area->filename, FALSE );
      fold_area( room2->area, room2->area->filename, FALSE );
      return;
   }

   do_shopset( ch, "" );
   return;
}

try that out and see if that gets shopset to work, ill try to get around to checking more stuff tomorrow evening,
       
Post is unread #60 Aug 4, 2013, 8:29 pm
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

thanks I'm heading to bed as well in a few minutes

you've been such a big help
       
Pages:<< prev 1, 2, 3, 4, 5 ... next >>