ZeroKitteh Posted March 26, 2015 Share Posted March 26, 2015 I've been working on a mod recently, and I need to be able to remove and add gold to a player's inventory for buying a house.Now, this is what I have in my script. http://i.imgur.com/J82Ltz0.png The notifications work just fine, ignore those. But when it comes to the first and third lines, there's the trouble.For the first line, I want to remove 1,000 gold from the player's inventory. For the third, I want to add a key to the player's inventory.Now, when I compile, I get no error whatsoever. I have all proper alias needed, for gold and key (keyy is not mispelled, just the alias I made. Don't question it.)In game, though, it does nothing but display notifications. I do not receive a key, nor do I have any gold taken away. Does anyone have a simple solution to this issue? I've been looking everywhere and nothing works, eh. Link to comment Share on other sites More sharing options...
sLoPpYdOtBiGhOlE Posted March 26, 2015 Share Posted March 26, 2015 (edited) Get the base object eg: Alias_Gold.GetRef().GetBaseObject() Alias_Keyy.GetRef().GetBaseObject() Edited March 26, 2015 by sLoPpYdOtBiGhOlE Link to comment Share on other sites More sharing options...
ZeroKitteh Posted March 27, 2015 Author Share Posted March 27, 2015 Didn't work, caused an error when compiling? Link to comment Share on other sites More sharing options...
sLoPpYdOtBiGhOlE Posted March 27, 2015 Share Posted March 27, 2015 (edited) And the error is? Also might help if you show a screenshot of each alias window so I can see how your filling each of those alias. Edited March 27, 2015 by sLoPpYdOtBiGhOlE Link to comment Share on other sites More sharing options...
ZeroKitteh Posted March 28, 2015 Author Share Posted March 28, 2015 Alright, so.. http://i.imgur.com/LE268hE.pngThat's all the aliases. http://i.imgur.com/oHtx4x4.pngGold. http://i.imgur.com/cLdgGR2.pngKey. Now for the error.. http://i.imgur.com/Y25fo68.pngSo confused.. Link to comment Share on other sites More sharing options...
sLoPpYdOtBiGhOlE Posted March 28, 2015 Share Posted March 28, 2015 The error isn't in your code.The error is: Unable to find flags file: TESV_Papyrus_Flags.flgIf your getting that error then it means you'd be getting that error anytime you compile anything. To be honest the only time I've seen that error was when I added papyrus compile option to my 3rd party text editor. I have a sneaking suspision that the recent Skyrim steam update has screwed with ck psc files.As I've seen recent posts with people with the same compile error and it turned out that after the update all their *.psc source files have been packed in a scripts.rar and removed from their Data\Scripts\Source\ directory.(I haven't let my Skyrim update. So I'm only going from what I've read from others recent posts about it). As for your Gold alias, it's not pointing to anything, are you forcing a reference to the Gold alias at a later time? Link to comment Share on other sites More sharing options...
ZeroKitteh Posted March 28, 2015 Author Share Posted March 28, 2015 I don't exactly get what you mean,"As for your Gold alias, it's not pointing to anything, are you forcing a reference to the Gold alias at a later time?"(Heh, I'm kind of new to this.)All I'm doing is having a player buy something from an NPC, the NPC takes the gold and adds the key.The only reference I ever have to the gold alias is the one I've shown. And I'm not sure whats wrong at this point because, still, even when I load the game, it doesn't add the key or gold to the player inventory.. I really just need a fix for that. Link to comment Share on other sites More sharing options...
cubedj21 Posted March 28, 2015 Share Posted March 28, 2015 (edited) first of all you have to fix the Unable to find flags file: TESV_Papyrus_Flags.flg ... or you won't be able to compile any scripts.... simply create a text file named TESV_Papyrus_Flags.txtpaste this content: Reveal hidden contents /* Format is as follows (whitespace is completely ignored, index must be between 0 and 31 inclusive): Flag <name> <index> // flag is allowed on all types or: Flag <name> <index> { <list of script, property, variable, or function> } // flag is allowed only on the specified types*/// List of flags for TESV - DO NOT EDIT// Flag hides the script or property from the game editorFlag Hidden 0{ Script Property}// Flag on an object designates it as the script the condition system will look at// Flag on a variable allows the script variable to be examined by the condition systemFlag Conditional 1{ Script Variable} save the file and change the extension txt to flg... then save it in \Data\Scripts\Source\ in this case you don't have to define quest aliases for Gold or the Key... define them as script properties in CreationKit - the script will then look like this: Reveal hidden contents ;Propertiesmiscobject Property Gold Autokey Property HouseKey Auto game.getplayer().RemoveItem(Gold, 1000)game.getplayer().AddItem(HouseKey) ... to better understand, check the HousePurchase quest and its scripts in CreationKit :wink: Edited March 28, 2015 by cubedj21 Link to comment Share on other sites More sharing options...
Recommended Posts