I didn't look too hard at your king function to see if anything
was wrong there, but I'm going to guess that a potential crash
exists in the do_score part of it. You create a pointer to
a char called kingdo then do a sprintf to it. What's the size
of kingdo though? (ie. you haven't malloc'd any space for it yet).
You can probably just skip the intermediate variable and do
sprintf(buf, "%sYou are a member of %s.\r\n", buf, king(ch,"no
Kingdom",TRUE));
Just a guess though, hope this helps.
>--in act.informative.c--
>in do_score
>
> char *kingdo;
>
>sprintf(kingdo, "%s",king(ch,"no Kingdom",TRUE));
>sprintf(buf, "%sYou are a member of %s.\r\n",buf,kingdo);
>
>
>I've tried different combinations of using pointers and character arrays
>and even using the king function directly in the "You are a member of"
>sprintf. Any ideas?
>
>______________________________ __ _ _
>|TDRD tdlord@elite.net
>|QuakeWorld TF2.7 PUBLIC: quake.elite.net ten.bigcity.net
>|Irc : irc.elite.net irc.lowrider.com
>|MUD : mud.elite.net 4000 HaqMUD
>|Clan Epidemic
>|Clan Infinity
>
>
> +------------------------------------------------------------+
> | Ensure that you have read the CircleMUD Mailing List FAQ: |
> | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
> +------------------------------------------------------------+
>
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST