[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  SWR crashes (open/closebay)
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

SWR crashes (open/closebay)

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


Posted by Destiny   (14 posts)  [Biography] bio
Date Thu 16 Jan 2003 02:52 PM (UTC)
Message
in space.c under do_launch

{
int chance;
long price = 0;
SHIP_DATA *ship;
char buf[MAX_STRING_LENGTH];
SHIP_DATA *onship;

if ( ( onship = ship_from_hanger( ship->lastdoc ) ) != NULL && ! onship->bayopen )
{
send_to_char("&RThe hanger is closed!\n\r",ch);
return;
}

this check alone is crashing the mud and for the life of me i cannot figure out why. anyone else have any ideas? it crashes every time someone tries to launch (regardless of whether or not their ship is in a hangar)
[Go to top] top

Posted by Boborak   USA  (228 posts)  [Biography] bio
Date Reply #1 on Thu 16 Jan 2003 04:16 PM (UTC)
Message
It's highly unlikely the cause of your crash is that code you have posted. It *IS* possible that the ship_from_hanger function could be crashing it though. Post it so we can take a look at it. Btw, If you say it's crashing no matter where someone launches from, do a test and comment out that section of code, then see what happens.
[Go to top] top

Posted by Destiny   (14 posts)  [Biography] bio
Date Reply #2 on Thu 16 Jan 2003 04:18 PM (UTC)
Message
I've already commented out that check, but it looks like any time i use onship it crashes.
[Go to top] top

Posted by Destiny   (14 posts)  [Biography] bio
Date Reply #3 on Thu 16 Jan 2003 04:21 PM (UTC)
Message
let me clarify that. i tried commenting that out once and launch works fine, then i try a few other ways of doing it that should work as well. regardless of how i use onship, it crashes the mud.
[Go to top] top

Posted by Boborak   USA  (228 posts)  [Biography] bio
Date Reply #4 on Thu 16 Jan 2003 04:22 PM (UTC)
Message
It's more then likely the ship_from_hangar code then. Post it ;-)
[Go to top] top

Posted by Boborak   USA  (228 posts)  [Biography] bio
Date Reply #5 on Thu 16 Jan 2003 04:31 PM (UTC)
Message
Just thought of something.. where exactly is that code you posted, located in do_launch? If it's not below:

if ( (ship = ship_from_cockpit(ch->in_room->vnum)) == NULL )
{
send_to_char("&RYou must be in the cockpit of a ship to do that!\n\r",ch);
return;
}

Then THAT would be why it's crashing ;-)
[Go to top] top

Posted by Destiny   (14 posts)  [Biography] bio
Date Reply #6 on Thu 16 Jan 2003 04:32 PM (UTC)
Message
nevermind, i figured it out. I was doing onship = ship->blah blah, but i hadnt set ship to anything yet.
[Go to top] top

Posted by Boborak   USA  (228 posts)  [Biography] bio
Date Reply #7 on Thu 16 Jan 2003 04:36 PM (UTC)
Message
Hehe. Kinda what I was thinking ;-)
[Go to top] 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.


3,785 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]