Jump to content

Scripting to give gold to a player won't work...why?


96downlu

Recommended Posts

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment

Scriptname GiveBuskerGold extends TopicInfo Hidden



MiscObject Property Gold = Gold001 Auto

{Gold}


;BEGIN FRAGMENT Fragment_0

Function Fragment_0(ObjectReference akSpeakerRef)

Actor akSpeaker = akSpeakerRef as Actor

;BEGIN CODE

Game.getplayer().RemoveItem(Gold001, 10)

akspeaker.additem(Gold001, 10)

;END CODE


EndFunction

;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment



Anybody know why it won't work

thanks
Link to comment
Share on other sites

That doesn't add properties for the reference, but what it does do is to allow you to 'auto-fill' the value. But you still need to click on add properties then click on 'auto-fill.'

Link to comment
Share on other sites

Dont seem to be able to add the property. It just keeps failing compilation :( Heres the error log:

 

 

Starting 1 compile threads for 1 files...
Compiling "GiveBuskerGold"...
D:\Luke\Programs\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\GiveBuskerGold.psc(5,27): no viable alternative at input 'Gold001'
No output generated for GiveBuskerGold, compilation failed.
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on GiveBuskerGold
Link to comment
Share on other sites

Change this line:

 

MiscObject Property Gold = Gold001 Auto

 

to this:

 

MiscObject Property Gold001 Auto

 

Then in the CK, click the properties tab on the script, highlight Gold001, and click Auto Fill. This should point the property to the right form.

 

If you use Gold instead of Gold001 as your variable, you won't be able to auto-fill, but you can still manually pont the property to the right object in the CK.

 

It's absolutely necessary that you do this step, setting your properties.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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