DB.Query during Advanced Setup

Szpilman

Void Co. Chairman
Joined
Dec 2, 2006
Messages
746
Location
Cola
I'm trying to have some new options in Advanced Setup that when toggled send queries to the database to change settings (and revert them to vanilla when toggled off).

Everything is working but the actual database changes, it seems.
Below is one of the queries, which are dynamically built and stored in a variable and I print the variable successfully to the Tuner, just before sending it through 'DB.Query(query)';
"UPDATE Defines SET 'Value' = 33 WHERE Name = 'BARBARIAN_EXTRA_RAGING_UNIT_SPAWN_CHANCE';"

What could be wrong?
- Is my query valid?
- Is there any include or anything necessary to call DB.Query?
- Cannot database changes be made during Advanced Setup?

On a related question, how to Set multiple fields on a single query? I currently have one query going:

"UPDATE HandicapInfos SET 'AIBarbarianBonus' = 100 'BarbarianBonus' = 0 'BarbarianLandTargetRange' = 20 'BarbarianSeaTargetRange' = 30 WHERE Type = 'HANDICAP_DEITY';"

But I'm pretty sure there should be some adjoiner or separator.
 
Top Bottom