Jump to content

Function compiles successfully... with error.


antstubell

Recommended Posts

This function looks fine to me and I get the 'Compile Succeeded' message. I also get -

psc(11,7): type mismatch on parameter 1 (did you forget a cast?)

It's a script within a quest which I 'kmyquest' on occasionally if that's any help.

 

 

Scriptname My_QSTrandomCoinScript extends Quest

GlobalVariable Property RndNum Auto
Sound Property MySND0 Auto

Function RandomNumber()
Int iRand = Utility.RandomInt(0, 2)
RndNum.SetValue(iRand as Int)

If RndNum.GetValue() == 0
MySND0.play(self)
Endif
EndFunction

 

Link to comment
Share on other sites

As Rasikko said.

 

MySND0.play(self)
self = Where ?
Should look something like this :
Actor Property ActorREF auto
MySND0.play(ActorREF) or MySND0.play(Game.GetPlayer())
Or wherever you want the sound to play from.
Edited by maxarturo
Link to comment
Share on other sites

  • Recently Browsing   0 members

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