Darios81 Posted September 15, 2012 Share Posted September 15, 2012 Hi guys, I one of you can heelp me with my problemI try to add an additional purchase option for breezehome but nothing works. I followed all steps in this tutorial (http://forums.bethsoft.com/topic/1346963-tutorial-custom-house-upgrades-via-npc/) but at step 6 I get followinf error message:Starting 1 compile threads for 1 files...Compiling "TIF__0100CC0B"...d:\spiele\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100CC0B.psc(9,28): variable gold is undefinedd:\spiele\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100CC0B.psc(9,34): variable HDWhiterunBasement is undefinedd:\spiele\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100CC0B.psc(9,53): none is not a known user-defined typed:\spiele\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100CC0B.psc(9,59): cannot cast a none to a int, types are incompatibled:\spiele\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100CC0B.psc(10,0): variable decoratemarker is undefinedd:\spiele\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100CC0B.psc(10,15): none is not a known user-defined typed:\spiele\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100CC0B.psc(11,0): variable oldmarker is undefinedd:\spiele\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100CC0B.psc(11,10): none is not a known user-defined typeNo output generated for TIF__0100CC0B, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on TIF__0100CC0B the gloabal variablel HDWhiterunBasement exists, decoratemarker and oldmarker are defined in the previous script etc What am I doing wrong? Link to comment Share on other sites More sharing options...
Ghaunadaur Posted September 16, 2012 Share Posted September 16, 2012 Without looking at the script it's hard to help you, please post it. Link to comment Share on other sites More sharing options...
Darios81 Posted September 16, 2012 Author Share Posted September 16, 2012 Its the standard script you find in all the other purchase topics.game.getplayer().removeitem(gold, HDWhiterunBasement.value as int)decoratemarker.enable()oldmarker.disable() Link to comment Share on other sites More sharing options...
Ghaunadaur Posted September 16, 2012 Share Posted September 16, 2012 (edited) Its the standard script you find in all the other purchase topics.game.getplayer().removeitem(gold, HDWhiterunBasement.value as int)decoratemarker.enable()oldmarker.disable() That's the script fragment, not the script itself. Right-click the script in the 'Script Name' section and select 'Edit source'. Make sure the names of the variables and properties in the script are matching those of the script fragment (i.e. HDWhiterunBasement). Re-compile the script by saving it, then compile the script fragment (Compile button). If the error window is popping up, there's still something wrong in the script. Edit: The script should look like this: ;BEGIN FRAGMENT Fragment_0 Function Fragment_0(ObjectReference akSpeakerRef) Actor akSpeaker = akSpeakerRef as Actor ;BEGIN CODE game.getplayer().removeitem(gold, HDWhiterunBasement.value as int) decoratemarker.enable() oldmarker.disable() ;END CODE EndFunction ;END FRAGMENT ;END FRAGMENT CODE - Do not edit anything between this and the begin comment int Property GoldAmount Auto MiscObject Property Gold Auto ObjectReference Property DecorateMarker Auto GlobalVariable Property NewProperty Auto GlobalVariable Property HDWhiterunBasement Auto ObjectReference Property OldMarker Auto Edited September 16, 2012 by Ghaunadaur Link to comment Share on other sites More sharing options...
Darios81 Posted September 16, 2012 Author Share Posted September 16, 2012 (edited) Ok, I still get the same message. Weird thing is, even if I try to copy matching scripts from other topics, it causes the same problem. Seems to me that the CK doesnt like me scripting. You posted a new code line:GlobalVariable Property NewProperty Autowhat is it supposed to do? And I just mentioned another problem, the game is now reading my HDWhiterunBasement. When I talk to the steward, it shows "Basement [...] Gold". Edited September 16, 2012 by Darios81 Link to comment Share on other sites More sharing options...
Ghaunadaur Posted September 16, 2012 Share Posted September 16, 2012 Same error message? I really don't know know what's going wrong on your side. Could you post the full script? Well, I just copied the code from an existing script, matching your properties. 'NewProperty' isn't used by the script, it can be deleted or leave it as it is. I had the same problem, the value not being displayed correctly, even after I added the global variable to the 'text display globals'. I just decided to type in the value by hand. Link to comment Share on other sites More sharing options...
Darios81 Posted September 16, 2012 Author Share Posted September 16, 2012 (edited) ;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment ;NEXT FRAGMENT INDEX 1 Scriptname TIF__D81BASE1 Extends TopicInfo Hidden ;BEGIN FRAGMENT Fragment_0 Function Fragment_0(ObjectReference akSpeakerRef) Actor akSpeaker = akSpeakerRef as Actor ;BEGIN CODE game.getplayer().removeitem(gold, HDWhiterunBasement.value as int) decoratemarker.enable() oldmarker.disable() ;END CODE EndFunction ;END FRAGMENT ;END FRAGMENT CODE - Do not edit anything between this and the begin comment int Property GoldAmount Auto MiscObject Property Gold Auto ObjectReference Property Decoratemarker Auto GlobalVariable Property HDWhiterunBasement Auto ObjectReference Property OldMarker Auto Edit: what I forgot to mention is, every time I click compile under fragment, a new script appears in the right box Edited September 16, 2012 by Darios81 Link to comment Share on other sites More sharing options...
Ghaunadaur Posted September 16, 2012 Share Posted September 16, 2012 (edited) Ok, then the name of the script fragment is different from the main script. This is what I did: In the Papyrus fragment section, I selected 'advanced' and 'rename script'. Filled it with the name of your script. A new script appeared on the right hand side. Opened it by selecting 'edit source' and pasted exactly your script, compiled. The script fragment is this: game.getplayer().removeitem(gold, HDWhiterunBasement.value as int) decoratemarker.enable() OldMarker.disable() Compiled this also and got no errors. Edited September 16, 2012 by Ghaunadaur Link to comment Share on other sites More sharing options...
Darios81 Posted September 16, 2012 Author Share Posted September 16, 2012 Wow, ok. That was weird.I deleted script and fragment. Saved all changes and did it I like you, now it worked. Now the day is saved. :) Thank you!!! Link to comment Share on other sites More sharing options...
Recommended Posts