Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Stowslee
Wanderer


Joined: 20 Apr 2008
Posts: 69
Location: Watervliet, NY

PostPosted: Wed Jan 21, 2015 11:26 am   

SQL Script Crashing
 
So this is a fairly new aspect of CMUD for me, and I've been testing it out with excellent results. The latest piece I have been messing with works great while offline, however when connected to the MUD the program ends up non-responsive once the alias is called.

Code:
#VAR Running_Affliction_Management 1

#SQLDB aetolia.db
row = %sql( aetolia, "SELECT * FROM Afflictions")
#WHILE (!@row.Eof()) {#IF (%ismember( @row.Item("Affliction"), @Character_Afflictions)) {#IF ((@row.Item("Cure_Type") = slice) and @Character_Vitals.herb and (@Slice_Healing = 0) and (%ismember( anorexia, @Character_Afflictions) = 0)) {
      $Slice_Needed = @row.Item("Cured_With")
      #VAR Slice_Healing 1
      Eat_Slice $Slice_Needed
      #ALARM {+1} {#VAR Slice_Healing 0}
      #VAR Running_Affliction_Management 0
      #ABORT All
      } {#IF ((@row.Item("Cure_Type") = poultice) and @Character_Vitals.salve and (@Poultice_Healing = 0) and (%ismember( slickness, @Character_Afflictions) = 0)) {
        $Poultice_Needed = @row.Item("Cured_With")
        $Poultice_Location = @row.Item("Location")
        #VAR Poultice_Healing 1
        press $Poultice_Needed on $Poultice_Location
        #ALARM {+1} {#VAR Poultice_Healing 0}
        #VAR Running_Affliction_Management 0
        #ABORT All
        } {#IF ((@row.Item("Cure_Type") = tincture) and @Character_Vitals.pipe and (@Tincture_Healing = 0) and (%ismember( limp_veins, @Character_Afflictions) = 0)) {
          $Tincture_Needed = @row.Item("Cured_With")
          #VAR Tincture_Healing 1
          INJECT $Tincture_Needed
          #ALARM {+1} {#VAR Tincture_Healing 0}
          #VAR Running_Affliction_Management 0
          #ABORT All
          }}}} {#CALL @row.Next}}
#SQLCLOSE aetolia

#VAR Running_Affliction_Management 0


I am certain this is probably a little more complicated than necessary, and will trim it down as I get more in depth. But the above is the rough idea of what I'm looking to do. Anyone able to see what I might be doing wrong?
Reply with quote
Stowslee
Wanderer


Joined: 20 Apr 2008
Posts: 69
Location: Watervliet, NY

PostPosted: Thu Jan 22, 2015 12:12 pm   
 
A bit of an update on this, works fine when called from the command line. However when I try to call this out of a trigger, that is when it all goes downhill and the program crashes.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net