Jump to content
  • 0

setDamageOnAge


Mat43

Question

Hi I have a server I host on Vilayer and am trying to get the setDamageOnAge query to work in the data base.

I have placed down some test building and when I run the event

UPDATE `Object_DATA` SET `Damage`=0.2 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )

It does not seem to do anything. I can see the buildings in the database, but when the query is ran it affects 0 rows and the items remain @ 0 damage.

 

I have this set up on my local test server and it works fine. I am using Navicat lite

 

Can any one help me please?

 

PS. what is the difference between an "event" & a "query"?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

An event is something like an scheduled query. It's executed by the database alone (not invoked from an application like your epoch).

So if it does not really matter when this is called (so from a games logic point of view) it's the best you can do to let the db do it automatically.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...