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 ➜ Compiling the server ➜ BUG: Slot_lookup: bad slot 10.

BUG: Slot_lookup: bad slot 10.

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


Posted by Aqueus   USA  (47 posts)  Bio
Date Sat 27 Jan 2007 08:41 PM (UTC)
Message
Ok, so I know this may sound... vague, but I was compiling and in my syslog I got this:

Sat Jan 27 14:17:56 2007 :: [*****] BUG: Slot_lookup: bad slot 10.

Where should I look to find the problem? Just beforehand I was coding in comm.c... I had edited the player struct to support WIS again (Head Coder, whom we fired took it out...) and everything compiled fine... just won't boot.
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #1 on Sat 27 Jan 2007 10:04 PM (UTC)
Message
Not sure I could tell you what exactly your problem is there, but the bug it's generating on you is coming from magic.c here:

int slot_lookup( int slot )
{
extern bool fBootDb;
int sn;
if( slot <= 0 )
return -1;
for( sn = 0; sn < top_sn; sn++ )
if( slot == skill_table[sn]->slot )
return sn;
if( fBootDb )
{
bug( "Slot_lookup: bad slot %d.", slot );
abort( );
}
return -1;
}

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
Top

Posted by Aqueus   USA  (47 posts)  Bio
Date Reply #2 on Sun 28 Jan 2007 01:25 AM (UTC)
Message
Ok, I found out exactly what went wrong. While I was editing mud.h the fatal error occurred. I add in an apply-type, the one used for applying affects to objects. This offset my list so that when one of my 4 areas (still trying to get the code on its feet, so they are stock) tried to address the old apply type for constitution it read back APPLY_WIS, which... evidently points nowhere.

So! Question time: How do I make it so that APPLY_WIS affects the phantom stat WIS. I added it into all the character creation stuff in comm.c, I added it to the player struct, all of that crazy stuff, but evidently it doesn't actually GO anywhere yet... So I guess I'm asking how do I add a stat?

The version I'm using has only four stats and I'd like to add Wisdom in there. Perhaps I could call it something else (side question: How hard, meaning where would I have to look to change the name of the stats so they are what I want, instead of stock?).
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #3 on Sun 28 Jan 2007 02:54 AM (UTC)
Message
I'm not sure that I know, off-hand, how to answer your first question, but for what the stats are called, from the player perspective you'd only have to change what's displayed in do_score, do_oldscore, do_newscore and possibly the way extra affects display in the identify spell.

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #4 on Sun 28 Jan 2007 05:45 AM (UTC)
Message
I think adding stats is as easy as adding a new data member to the structure. Then you just refer to it wherever you need it; add a get_stat function in handler.c (like for get_str, get_current_str, etc.). And finally you add it to the score display.

As for changing the name: what Conner said.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

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

Posted by Aqueus   USA  (47 posts)  Bio
Date Reply #5 on Sun 28 Jan 2007 06:40 PM (UTC)
Message
See... it is that easy, that adds the stat, the problem is, that things like mset don't identify it, even though I put the apply-type in the apply structure (APPLY_CON, APPLY_INT, APPLY_KICK, etc.) but it just doesn't register with the MUD that the stat exists.
Top

Posted by Aqueus   USA  (47 posts)  Bio
Date Reply #6 on Sun 28 Jan 2007 07:15 PM (UTC)
Message
Eureka! I haven't solved my problem, nay, but I did find the source. My apply types and affects types, all that stuff has been thrown off.

I added in new affect types, because, well... we had new skills, etc, etc. Anyways, now when I set an affect type, like say... Truesight, it gives me something WAY off, like Detect Evil. How can I set my affect/apply types right?
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #7 on Sun 28 Jan 2007 11:01 PM (UTC)
Message
Make sure that you add it to the matching array in build.c in the same order as you've added it to mud.h.

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.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.


22,273 views.

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.