Jump to content

Problem with adding new house decoration options


Darios81

Recommended Posts

Hi guys,

 

I one of you can heelp me with my problem

I 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 undefined

d:\spiele\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100CC0B.psc(9,34): variable HDWhiterunBasement is undefined

d:\spiele\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100CC0B.psc(9,53): none is not a known user-defined type

d:\spiele\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100CC0B.psc(9,59): cannot cast a none to a int, types are incompatible

d:\spiele\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100CC0B.psc(10,0): variable decoratemarker is undefined

d:\spiele\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100CC0B.psc(10,15): none is not a known user-defined type

d:\spiele\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100CC0B.psc(11,0): variable oldmarker is undefined

d:\spiele\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100CC0B.psc(11,10): none is not a known user-defined type

No 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

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 by Ghaunadaur
Link to comment
Share on other sites

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  Auto

what 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 by Darios81
Link to comment
Share on other sites

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

;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 by Darios81
Link to comment
Share on other sites

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 by Ghaunadaur
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...