FredMB
Chieftain
Hello everyone
I was having problems recently with using SQL to increase the number of moves of all units. I was using the following code:
UPDATE Units
SET Moves=Moves+1
WHERE Moves >= 1;
The SQL was updating the in game units just fine but wouldn't touch the new units I created in a separate XML file.
I was at a loss until I decided to double check the Actions panel in ModBuddy. It turns out the solution was simple.
My SQL file was listed above my XML file. It looks like the actions are performed in the order they are listed. This might have been obvious to most but up until then I didn't pay attention to the order. I deleted the SQL line and re added it at the bottom. That did the trick. The moves were now updated for the in game units and my new units.
Since it took me long enough to figure this one out I thought I'd share.
Cheers.
I was having problems recently with using SQL to increase the number of moves of all units. I was using the following code:
Spoiler :
UPDATE Units
SET Moves=Moves+1
WHERE Moves >= 1;
The SQL was updating the in game units just fine but wouldn't touch the new units I created in a separate XML file.
I was at a loss until I decided to double check the Actions panel in ModBuddy. It turns out the solution was simple.
My SQL file was listed above my XML file. It looks like the actions are performed in the order they are listed. This might have been obvious to most but up until then I didn't pay attention to the order. I deleted the SQL line and re added it at the bottom. That did the trick. The moves were now updated for the in game units and my new units.
Since it took me long enough to figure this one out I thought I'd share.
Cheers.