I need scripting help

Post » Tue May 28, 2013 11:53 am

k im using this fragment script for one of the scripts that allows me to buy and decorate a house

game.getplayer().removeitem(gold, HDSolitudeBasemant.value as int)
decoratemarker.enable()

the problem is i keep getting this error

Starting 1 compile threads for 1 files...
Compiling "TIF__0100530D"...
F:\Steam\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100530D.psc(9,28): variable gold is undefined
F:\Steam\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100530D.psc(9,34): variable HDSolitudeBasemant is undefined
F:\Steam\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100530D.psc(9,53): none is not a known user-defined type
F:\Steam\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100530D.psc(9,59): cannot cast a none to a int, types are incompatible
F:\Steam\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100530D.psc(10,0): variable decoratemarker is undefined
F:\Steam\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0100530D.psc(10,15): none is not a known user-defined type
No output generated for TIF__0100530D, compilation failed.
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on TIF__0100530D

what did i do wrong

User avatar
Alexander Lee
 
Posts: 3481
Joined: Sun Nov 04, 2007 9:30 pm

Post » Tue May 28, 2013 3:23 pm

Your vairables/identifiers must have values assigned by one means or the other.
Function Fragment_0(ObjectReference akSpeakerRef)	Actor PlayerREF = Game.GetForm(0x00000014) As Actor	GlobalVariable HDSolitudeBasemant = Game.GetFormFromFile(0x00000000, "Skyrim.ESM") As GlobalVariable	MiscObject Gold001 = Game.GetFormFromFile(0x0000000F, "Skyrim.ESM") As MiscObject	ObjectReference DecorateMarker = Game.GetFormFromFile(0x00000000, "Skyrim.ESM") As ObjectReference	PlayerREF.RemoveItem(Gold001, HDSolitudeBasemant.GetValue() As Int)	DecorateMarker.Enable()EndFunction
You'd need to edit the 00000000 instances so they'll match the FormIDs/file the forms are define in.
User avatar
Yvonne
 
Posts: 3577
Joined: Sat Sep 23, 2006 3:05 am


Return to V - Skyrim