RELIC_IN_PROGRESS missing from char_vars.

Post Reply
Gratis
Posts: 55
Joined: Wed Jun 26, 2013 11:26 pm

RELIC_IN_PROGRESS missing from char_vars.

Post by Gratis » Sun Sep 15, 2013 1:22 pm

The relic in progress field disappeared from the database how to I add it back via GM command?

Gratis
Posts: 55
Joined: Wed Jun 26, 2013 11:26 pm

Re: RELIC_IN_PROGRESS missing from char_vars.

Post by Gratis » Sun Sep 15, 2013 1:51 pm

Been working on a query but not sure if I have it quite right. Can anyone point me in the right direction?

INSERT INTO `char_vars` WHERE varname=RELIC_IN_PROGRESS WHERE charid='';

Or would INSERT INTO `char_vars` SET varname=RELIC_IN_PROGRESS WHERE charid=''; is what I want? Or am I completely off here?

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: RELIC_IN_PROGRESS missing from char_vars.

Post by kjLotus » Sun Sep 15, 2013 2:01 pm

easiest way is to just make a GM command that calls the function that adds the char var, so you don't have to make your own query (that'd be CLuaBaseEntity::setVar)

alternatively, the query that setVar uses is "INSERT INTO char_vars SET charid = %u, varname = '%s', value = %i ON DUPLICATE KEY UPDATE value = %i;"

Gratis
Posts: 55
Joined: Wed Jun 26, 2013 11:26 pm

Re: RELIC_IN_PROGRESS missing from char_vars.

Post by Gratis » Sun Sep 15, 2013 3:30 pm

The % letters are variables? %u would be my charid and the item id is %i? so INSERT INTO char_vars SET charid = XXXXXX, varname = 'RELIC_IN_PROGRESS WHERE', value = XXXXX ON DUPLICATE KEY UPDATE value = XXXXX; or am I off?

Gratis
Posts: 55
Joined: Wed Jun 26, 2013 11:26 pm

Re: RELIC_IN_PROGRESS missing from char_vars.

Post by Gratis » Sun Sep 15, 2013 3:46 pm

It worked! Was able to add the field but its not working for ppl to turn in their relic stage 4 to 5. I guess I will just GM them the relics.

:(

Post Reply