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
➜ newarena, crashed by setting variable?
|
newarena, crashed by setting variable?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Zeno
USA (2,871 posts) Bio
|
| Date
| Mon 14 Feb 2005 01:19 AM (UTC) |
| Message
| I can't figure this out now. I installed LrdElder's newarena, and after fixing up so much... There was this odd crash.
#0 0x0816da78 in do_end_game () at newarena.c:518
#1 0x0814dc53 in update_handler () at update.c:2331
#2 0x080bd0d3 in game_loop () at comm.c:707
#3 0x080bc941 in main (argc=8, argv=0xbff05ac0) at comm.c:317
#0 0x0816da78 in do_end_game () at newarena.c:518
518 time_left_in_game = 0;
(gdb) list
513 act(AT_TELL,"$n falls from the sky.", i, NULL, NULL, TO_ROOM);
514 }
515 }
516 sprintf(buf, "After %d hours of battle the Match is a draw.",game_length);
517 sportschan(buf);
518 time_left_in_game = 0;
519 ppl_in_arena=0;
520 ppl_challenged = 0;
521 }
The variable is int:
Not a single clue here.
|
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #1 on Mon 14 Feb 2005 04:55 AM (UTC) |
| Message
| Chances are your evil is caused by a stack overflow somewhere. Given the complete ordinariness of the line, I'm almost certain it's something else.
If you still have Valgrind around this is a wonderful place to use it. It should also be much easier to reproduce than your other problems. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| Klered
(24 posts) Bio
|
| Date
| Reply #2 on Fri 25 Feb 2005 06:07 AM (UTC) |
| Message
| there are 2 parts of that snippet that didn't work me me.
Make sure you add this
after your 'for' statement in
int num_in_arena()
for ( d = first_descriptor; d ; d = d->next )
{ if (d->character != NULL)
Mine looks like
for ( d = first_descriptor; d ; d = d->next )
{ if (d->character != NULL) /*Klered - Perished Lands 01-19-01*/
{ if ( d->character->level >= lo_lim && d->character->level <= hi_lim)
send_to_char(buf1, d->character);
else
{ sprintf(buf, "The arena has been opened. %d hour(s) to start.\r\n", time_to_start);
sprintf(buf, "%sPlace your bets!!!\r\n", buf);
send_to_char(buf, d->character); } } }
as well as in
void start_arena()
mine looks like
for (d = first_descriptor; d; d = d->next)
{ if (d->character != NULL) /*Klered - Perished Lands 01-19-01*/
{ i = d->original ? d->original : d->character;
if (IS_SET(i->in_room->room_flags,ROOM_ARENA))
{ if(i->level < LEVEL_IMMORTAL)
num++; } } }
That really should help you out. | | Top |
|
| Posted by
| Zeno
USA (2,871 posts) Bio
|
| Date
| Reply #3 on Tue 01 Mar 2005 11:02 PM (UTC) Amended on Tue 01 Mar 2005 11:10 PM (UTC) by Zeno
|
| Message
| Yeah I've already done something like that.
Also has anyone fixed the time? For example, it'll say something like "after -50 hours blah is the winner". It's quite a mess.
Arena: After -24 hours of battle Yakon is declared the winner. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.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.
15,244 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top