TeensyMud - 'A ruby mud server.'

Subject: issue with 'makenoswap' with yaml db's
Subject: issue with 'makenoswap' with yaml db's
Author: Massaria
Posted: 01/18/2006 11:22AM

Running tmud with yaml dbtype, I get this error when I try to log in. It's a bit odd, as it didn't do this yesterday. Didn't change much since then though - just deleted a couple old world-files, and I can't see why that should matter. Certainly didn't mess around with YamlStore?.

...
06-01-18 17:06:56 [ INFO] (Engine) TMUD is ready
06-01-18 17:06:59 [ INFO] (Connection) (136631348) New Connection on 'localhost(127.0.0.1)'
06-01-18 17:06:59 [ INFO] (Acceptor) (136631348) Connection accepted.
06-01-18 17:07:05 [ INFO] (Account) db:
06-01-18 17:07:05 [ERROR] (Connection) (136631348) Connection#handle_input
06-01-18 17:07:05 [ERROR] (Connection) Caught NoMethodError?: undefined method `makenoswap' for :YamlStore?
./lib/db/account.rb:148:in `login'
./lib/db/account.rb:97:in `update'
./lib/publisher.rb:55:in `publish'
./lib/publisher.rb:51:in `publish'
./lib/net/connection.rb:86:in `handle_input'
./lib/net/reactor.rb:125:in `poll'
./lib/net/reactor.rb:122:in `poll'
06-01-18 17:07:05 [ INFO] (Connection) (136631348) Connection 'localhost(127.0.0.1)' closing
...

I poked around a bit to find a work-around. Ended up just commenting out the line ( $engine.world.db.makenoswap(@player.id) ).

(EDIT: Hmpf. A bit brutal I guess. Apparently it goes deeper than this solution)

Mass.

reply
Subject: issue with 'makenoswap' with yaml db's
Author: Tyche
Posted: 01/18/2006 12:56PM

Massaria wrote:
> Running tmud with yaml dbtype, I get this error when I try to log in. It's a bit odd, as it didn't do this yesterday. Didn't change much since then though - just deleted a couple old world-files, and I can't see why that should matter. Certainly didn't mess around with YamlStore?.
>
...
> I poked around a bit to find a work-around. Ended up just commenting out the line ( $engine.world.db.makenoswap(@player.id) ).
>

That'll work, until you logout. I applied the following to store.

$ svn diff lib/db/store.rb 
Index: lib/db/store.rb
===================================================================
--- lib/db/store.rb     (revision 111)
+++ lib/db/store.rb     (working copy)
@@ -99,6 +99,18 @@
   def each
   end
 
+  # Marks an object nonswappable
+  # [+oid+] is the object id
+  # [+return+] true or false
+  def makenoswap(oid)
+  end
+
+  # Marks an object swappable
+  # [+oid+] is the object id
+  # [+return+] true or false
+  def makeswap(oid)
+  end
+
   # produces a statistical report of the database
   # [+return+] a string containing the report
   def stats


This just adds empty method that YamlStore? will inherit.




reply