RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

MyRunUO: Updating character database - Works but with error

Nockar

Sorceror
Code:
MyRunUO: Updating character database
MyRunUO: Database statements compiled in 0.40 seconds
MyRunUO: Characeter database updated in 0.8 seconds
MyRunUO: Updating status database
MyRunUO: Exception caught in database thread
System.Data.Odbc.OdbcException: ERROR [HY000] [MySQL][ODBC 3.51 Driver][mysqld-5
.1.53-log]Column count doesn't match value count at row 1
  at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode r
etcode)
  at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior,
String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMet
hod)
  at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior,
String method, Boolean needReader)
  at System.Data.Odbc.OdbcCommand.ExecuteNonQuery()
  at Server.Engines.MyRunUO.DatabaseCommandQueue.Thread_Start()
MyRunUO: Status database updated in 0.4 seconds
Client: 192.168.xxx.xxx: Disconnected. [0 Online] [Nockar]

Well, I got the database to update and it work. It updates the player images and all that. So it works!

But every time it updates it throws the above error in the server console.

Would anyone be able to help me get rid of the error?
 

Phr3d13

Sorceror
i did a quick search, make sure you have your database fields/tables set up correctly. look for stray punctuation, like a misplaced comma or stuff like that
 

Nockar

Sorceror
Do you happen to have a file or a url with the info of how the tables are supposed to be setup?
 

Vorspire

Knight
This is pretty much the MySQL version of the same error you get when you mess up String.Format:

Code:
INSERT INTO players ( key1, key2. key3, key4, key5 ) VALUES ( val1, val2, val3, val4 )

5 keys, but 4 values = error.
 

Nockar

Sorceror
In my data base I have the following tables

myrunuo_characters
myrunuo_characters_layers
myrunuo_characters_skills
myrunuo_guilds
myrunuo_guilds_wars
myrunuo_status
myrunuo_timestamps

When I look at all the runuo scripts I see that they are all there but this one?
myrunuo_timestamps

Does anyone know what this table is and if it belongs that? Should i remove it from the DB?

When you look at myrunuo_timestamps it says "No index defined!"
 

Nockar

Sorceror
Code:
in the distro MyRunUOStatus.cs, line 58
m_Command.Enqueue( String.Format( "INSERT INTO myrunuo_status VALUES ({0})", mob.Serial.Value.ToString() ) );
the syntax is definately wrong, as the value is being written into nowhere. It should be:
m_Command.Enqueue( String.Format( "INSERT INTO myrunuo_status (char_id) VALUES ({0})", mob.Serial.Value.ToString() ) );

I found that in another thread and it seamed to fix it.
 
Top