Ferc Kast Posted January 19, 2008 Share Posted January 19, 2008 I just read this thread a few days ago; When I tried to compile the following script to access my new workbench in game, it didn't compile it: void main() { ShowUpgradeScreen(object oItem = OBJECT_INVALID, object oCharacter = OBJECT_INVALID, int nDisableItemCreation = FALSE, int nDisableUpgrade = FALSE, string sOverride2DA = "newitemcreate"); } Where did I go wrong? Also, I was wondering if this would work in K1 too or only TSL. Thanks in advance. Link to comment Share on other sites More sharing options...
Kristy Kistic Posted January 19, 2008 Share Posted January 19, 2008 Your trying to compile a function declaration, not an actual call to the function. You need to define the variables and fill them in the actual function. Note that the variable names do not have to match what they're called in the declaration. void main() { object oItem = OBJECT_INVALID; object oCharacter = OBJECT_INVALID; int nDisableUpgrade = FALSE; int nDisableItemCreation = FALSE; string sOverride2DA = "newitemcreate"; ShowUpgradeScreen(oItem, oCharacter, nDisableItemCreation, nDisableUpgrade, sOverride2DA); } I'm not absolutely certain about this, but since the function declaration defines default values you might be able to get away with this: ShowUpgradeScreen(,,,,sOverride2DA); Link to comment Share on other sites More sharing options...
Ferc Kast Posted January 19, 2008 Author Share Posted January 19, 2008 Thanks; It compiled perfectly with the first script that you suggested. I will be sure to credit you in the read me when I'm done with the main mod that I'm making. Hopefully, it'll save some space when I compress it for release. (At least, when compared to the big .utm file that I made.) EDIT: I just tried running the script in game; However, it doesn't work. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.