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
➜ Creating a new item
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Kain
USA (43 posts) Bio
|
Date
| Wed 10 Jul 2002 01:44 AM (UTC) |
Message
| Hi,
I'm trying to create a new item called "gun".
So I put the entries
case ITEM_GUN: in db.c
and
ITEM_GUN in mud.h
So then I go into Smaug and type "ocreate 1101 shotgun",
which creates a new object.
I then type in "oset 1101 type gun"
But then when I type in "ostat 1101", I get this message next to Vnum 1101 (where the type usually is):
LOG[*****] BUG: ITEM_TYPE_NAME: unknown type 65
Can anyone give me some advice as to what I'm doing wrong creating a new item?
Thanks | Top |
|
Posted by
| Chris L
USA (57 posts) Bio
|
Date
| Reply #1 on Wed 10 Jul 2002 01:49 AM (UTC) Amended on Wed 10 Jul 2002 01:59 AM (UTC) by Chris L
|
Message
| gotta add stuff in build.c in char * const o_types [] | Top |
|
Posted by
| Kain
USA (43 posts) Bio
|
Date
| Reply #2 on Wed 10 Jul 2002 02:06 AM (UTC) |
Message
| Thanks, I put "gun" at the end of:
char * const o_types [] =
and I still get the same error.
This is driving me nuts, I know I'm doing something stupid | Top |
|
Posted by
| Kain
USA (43 posts) Bio
|
Date
| Reply #3 on Wed 10 Jul 2002 11:52 PM (UTC) |
Message
| I figured it out...
In mud.h where the types are defined there is a line after the enum list of types that says (in mine at least)
#define MAX_ITEM_TYPE ITEM_CHANCE
I couldn't really figure out what that meant, until I realized that ITEM_CHANCE was the last type in the list. So I changed this to ITEM_GUN (which I set as the last item in the list) and it worked like a charm. | Top |
|
Posted by
| Kain
USA (43 posts) Bio
|
Date
| Reply #4 on Fri 12 Jul 2002 11:53 PM (UTC) |
Message
| Can someone please tell me what I'm doing wrong...
ocreate 1101 newitem
oset 1101 blah
blah
blah
blah
what do I have to do to get these new items to save? In the past, I've always used an offline editor, so I've never down in within SMAUG.
Thanks | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #5 on Fri 02 Aug 2002 03:33 AM (UTC) |
Message
| To save you mean to appear next time? That is what resets are for, they put objects, mobs etc. into rooms. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
17,900 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top