• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Variables not saving nor users can walk

Junior Spellweaver
Joined
Oct 18, 2014
Messages
101
Reaction score
12
Delete thisssssss
 
Last edited:
Joined
Jan 23, 2011
Messages
446
Reaction score
99
Try adding a else statement before the query where it inserts the information into the database.

Code:
  else                    {
                        Adapter.SetQuery("INSERT INTO user_rp_stats (user_id) VALUES (@userid)");
                        Adapter.AddParameter("userid", this.UserId);
                        Adapter.RunQuery();
                    }
                }
 
Upvote 0
Junior Spellweaver
Joined
Oct 18, 2014
Messages
101
Reaction score
12
Try adding a else statement before the query where it inserts the information into the database.

Code:
  else                    {
                        Adapter.SetQuery("INSERT INTO user_rp_stats (user_id) VALUES (@userid)");
                        Adapter.AddParameter("userid", this.UserId);
                        Adapter.RunQuery();
                    }
                }

Thanks for the reply but it did not work
 
Upvote 0
Junior Spellweaver
Joined
Oct 18, 2014
Messages
101
Reaction score
12
bumpppppp



:| still looking for answers not sure why this is happening when users are being saved upon disconnection!
 
Upvote 0
Experienced Elementalist
Joined
Nov 11, 2015
Messages
238
Reaction score
89
Though why would you want to save a user's id?
I highly assume this is a static value and won't change.
 
Upvote 0
Junior Spellweaver
Joined
Oct 18, 2014
Messages
101
Reaction score
12
Though why would you want to save a user's id?
I highly assume this is a static value and won't change.

meh , although user_id is saving im just confused as duck why hit_points isn't and the rest



bumpp
 
Upvote 0
Junior Spellweaver
Joined
Oct 18, 2014
Messages
101
Reaction score
12
Pretty sure you have to give a value for each parameter in that query?

Have you tried logging the result of the query or catching any exceptions?

it's been fixed , due to saveplayer being called in wrong place
 
Upvote 0
Back
Top