Need help with sql

gargoyle575

Chieftain
Joined
Jan 20, 2012
Messages
94
I'm new here so I'm not sure if this is the right place to post this, if not tell me where to go. But here it goes. I am trying to make a mod for myself that removes unit obsoletion, allowing any unit in later eras. I also want to get better at sql. So my question is what am I doing wrong with this code, the changes wont apply: UPDATE Units SET ObsoleteTech='TECH_FUTURE_TECH' WHERE Class <> 'UNITCLASS_SETTLER';
I have made other mods before and I'm familiar with XML but thats it.
 
That's perfectly correct. It should work. (Well, actually I always use != instead of <>, but both are documented SQLite comparisons so I would be surprised if that is the problem.) Are you sure that you added it to the mod? It should be added as OnModActivated under Actions, exactly like an .xml (with VFS=false).

UPDATE Units SET ObsoleteTech=NULL is a better way to do what you want, though. You can make it universal by dropping the WHERE part. It's already NULL for settlers and many other units anyway.
 
Back
Top Bottom