<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 <channel>
  <atom:link href="https://smaugmuds.afkmods.com/index.php?a=rssfeed&amp;t=4880" rel="self" type="application/rss+xml" />
  <title>SmaugMuds - Topic: obj_from_char NULL ch issues</title>
  <link>https://smaugmuds.afkmods.com/index.php?a=rssfeed&amp;t=4880</link>
  <description>The largest Smaug community resource site. - </description>
  <language>en</language>
  <generator>SmaugMuds</generator>
  <ttl>60</ttl>
  <item>
   <title>obj_from_char NULL ch issues</title>
   <link>https://smaugmuds.afkmods.com/topic/objfromchar-null-ch-issues-4880/&amp;p=23848#p23848</link>
   <description> [quote=Leia]Your mud &amp;quot;groups objects&amp;quot; with the group_object() function? If so, it&#039;s counting only the objects that have different affects. [code]short inventory_total(CHAR_DATA *ch) { OBJ_DATA               *findobj, *findobj_next; short                   total = 0; for(findobj = ch-&amp;gt;first_carrying; findobj != NULL; findobj = findobj_next) { findobj_next = findobj-&amp;gt;next_content; total += findobj-&amp;gt;count;   &amp;lt;-------------------- That should solve it. </description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/objfromchar-null-ch-issues-4880/&amp;p=23848#p23848</guid>
   <pubDate>Fri, 13 Apr 2018 19:19:26 CDT</pubDate>
   <category>Coding</category>
   <author>nobody@example.com (Vladaar)</author>
  </item>
  <item>
   <title>obj_from_char NULL ch issues</title>
   <link>https://smaugmuds.afkmods.com/topic/objfromchar-null-ch-issues-4880/&amp;p=23847#p23847</link>
   <description>That&#039;s got to be it.  Thanks! </description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/objfromchar-null-ch-issues-4880/&amp;p=23847#p23847</guid>
   <pubDate>Fri, 13 Apr 2018 15:28:57 CDT</pubDate>
   <category>Coding</category>
   <author>nobody@example.com (Vladaar)</author>
  </item>
  <item>
   <title>obj_from_char NULL ch issues</title>
   <link>https://smaugmuds.afkmods.com/topic/objfromchar-null-ch-issues-4880/&amp;p=23846#p23846</link>
   <description>Your mud &amp;quot;groups objects&amp;quot; with the group_object() function? If so, it&#039;s counting only the objects that have different affects. [code]short inventory_total(CHAR_DATA *ch) { OBJ_DATA               *findobj, *findobj_next; short                   total = 0; for(findobj = ch-&amp;gt;first_carrying; findobj != NULL; findobj = findobj_next) { findobj_next = findobj-&amp;gt;next_content; total += findobj-&amp;gt;count;   &amp;lt;-------------------- That should solve it. } bug( &amp;quot;</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/objfromchar-null-ch-issues-4880/&amp;p=23846#p23846</guid>
   <pubDate>Fri, 13 Apr 2018 14:49:45 CDT</pubDate>
   <category>Coding</category>
   <author>nobody@example.com (Leia)</author>
  </item>
  <item>
   <title>obj_from_char NULL ch issues</title>
   <link>https://smaugmuds.afkmods.com/topic/objfromchar-null-ch-issues-4880/&amp;p=23845#p23845</link>
   <description>Leia that solved the problem with it not putting the proper amount in the bundle, but now my total_inventory is jacked up. This is my current working total_inventory function [code] short inventory_total(CHAR_DATA *ch) { OBJ_DATA               *findobj, *findobj_next; short                   total = 0; for(findobj = ch-&amp;gt;first_carrying; findobj != NULL; findobj = findobj_next) { findobj_next = findobj-&amp;gt;next_content; total++; } bug( &amp;quot;%s total %d&amp;quot;</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/objfromchar-null-ch-issues-4880/&amp;p=23845#p23845</guid>
   <pubDate>Fri, 13 Apr 2018 12:55:43 CDT</pubDate>
   <category>Coding</category>
   <author>nobody@example.com (Vladaar)</author>
  </item>
  <item>
   <title>obj_from_char NULL ch issues</title>
   <link>https://smaugmuds.afkmods.com/topic/objfromchar-null-ch-issues-4880/&amp;p=23844#p23844</link>
   <description>Try this: [code] OBJ_DATA *check_prev; while ( count2 != -1 &amp;amp;&amp;amp; count != number ) { for(check = ch-&amp;gt;last_carrying; check; check = check_prev) { check_prev = check-&amp;gt;prev_content; if ( check-&amp;gt;pIndexData-&amp;gt;vnum == jackpot &amp;amp;&amp;amp; count &amp;lt; number ) { if ( ch ) count++; separate_obj(check); obj_from_char(check); obj_to_obj( check, bundle ); } } count2--; }[/code]</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/objfromchar-null-ch-issues-4880/&amp;p=23844#p23844</guid>
   <pubDate>Fri, 13 Apr 2018 11:17:25 CDT</pubDate>
   <category>Coding</category>
   <author>nobody@example.com (Leia)</author>
  </item>
  <item>
   <title>obj_from_char NULL ch issues</title>
   <link>https://smaugmuds.afkmods.com/topic/objfromchar-null-ch-issues-4880/&amp;p=23843#p23843</link>
   <description>Hey guys I need a fresh set of eyes to look at this.  I am missing something simple I guess.  For some reason my obj_from_char call is having NULL ch a few times in the loop and screwing up my obj_to_obj call numbers.    What the intent of this code was, is to bundle up crafted items that players do, so that I can have a player craft 20 odd things for a quest mob, and carry it as 1 object giving a bundle of 20 crafted things to the mob to activate the act_prog. [code] /* too many damn loops </description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/objfromchar-null-ch-issues-4880/&amp;p=23843#p23843</guid>
   <pubDate>Thu, 12 Apr 2018 18:47:45 CDT</pubDate>
   <category>Coding</category>
   <author>nobody@example.com (Vladaar)</author>
  </item>
 </channel>
</rss>
