cchan0535 Posted April 10, 2011 Share Posted April 10, 2011 Hey all, I'm trying to clean up a mod I like that happens to be somewhat poorly scripted. One of the major things wrong with it is that it creates a slew of global variables that it really shouldn't and I was planning on getting rid of them by using the script for an inactive quest I created as a database and reworking the rest of the mod to use it instead of the globals. Problem is, I've created the database script, attached it to its quest and compiled everything, but when I try to read or write to the "database," the Construction Set complains that nothing in the database actually exists. According to the tutorial on the CS wiki (which I've quadruple checked at this point) I did everything correctly, so I don't have a clue where to go from here. Any help would be greatly appreciated! Thanks, cchan0535 Link to comment Share on other sites More sharing options...
David Brasher Posted April 10, 2011 Share Posted April 10, 2011 Oblivion is a big pain when it comes to variables. It is like the programmers assumed that different scripts would almost never have to look at variables in other scripts. You may wish to provide the forum with more information and post the scripts you are using. The system goes sort of like this:Quest name: AAVariableHolder Quest Script on quest AAVariableHolder: AAVariableHolderSCRIPT SCN AAVariableHolderSCRIPT Short AAOgreVar Short AAKillVar Short TalkOnce Float Timer2 Reference in another script to variable in AAVariableHolderSCRIPT: Set AAVariableHolder.AAOgreVar to 1 Note that you use the name of the quest holding the variables. NOT the name of the script holding the variables. Link to comment Share on other sites More sharing options...
cchan0535 Posted April 10, 2011 Author Share Posted April 10, 2011 Hey David, thanks for the info. I figured out the problem. I was trying to access the variables via the quest name in the "Quest Name" field rather than the quest's EditorID. Dumb mistake. Thanks again though! Link to comment Share on other sites More sharing options...
Recommended Posts