Jump to content

Small script, please could someone tell me where I am going wrong


Recommended Posts

Scriptname brutalstartup extends Quest


book property bookofguidance auto


Function OnInit()


Debug.MessageBox("blabla")

Game.AddPerkPoints (3)

Game.GetPlayer().AddItem(bookofguidance, 1, true)


EndFunction





Hello,


I have no idea what I am doing, this will successefully compile but won't do anything when I start a new game.


Essentially when I start the game I was to be able to add 3 perk points, add a book that is in a plugin to the players inventory and display a message.


Is there a reason this won't work?


Thanks!

Link to comment
Share on other sites

Thanks bud,

 

Ok so I have changed it, now I have this attached to a quest in CK.

 

 

 

Scriptname brutalstartup extends Quest
book property bookofguidance auto
Event OnQuestInit()
Debug.MessageBox("blabla")
Game.AddPerkPoints (3)
Game.GetPlayer().AddItem(bookofguidance, 1, true)
EndEvent
But when I run the kmyquest compiler it throws up this error:
Init is not a function or does not exist
No output generated for QF__02000D62, compilation failed.
Anyone have any ideas
Thanks in advance!
Link to comment
Share on other sites

  • Recently Browsing   0 members

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