Need scripting help - Spells etc

Post » Sun Jun 17, 2012 6:44 pm

Hi,

I've a script here; I'd like it to be run during gamemode, never stopping; but for some reasons it does not seem to work, even if the script compiles without errors... Here it is:

Scriptname SAGPlayerInChargenMyScript extends QuestQuest Property InChargen  AutoSpell Property Rested AutoSPell Property WellRested AutoSpell Property MarriageRested AutoFunction SomeFunction()			    registerForUpdate(0.5) ; Before we can use onUpdate() we must register.EndFunctionEvent OnUpdate()if Game.GetPlayer().HasSpell(Rested) || Game.GetPlayer().HasSpell(WellRested) || Game.GetPlayer().HasSpell(MarriageRested)Debug.MessageBox("Its okay")registerForUpdate(0.5)elseregisterForUpdate(0.5)Debug.MessageBox("Not Okay")EndifEndEvent

No message appear, so that means something is done wrong...
User avatar
Chloe :)
 
Posts: 3386
Joined: Tue Jun 13, 2006 10:00 am

Post » Mon Jun 18, 2012 7:33 am

Are you calling SomeFunction() from someplace? Like, say, the starting stage of your quest?
User avatar
Emma-Jane Merrin
 
Posts: 3477
Joined: Fri Aug 08, 2008 1:52 am

Post » Sun Jun 17, 2012 6:16 pm

Are you calling SomeFunction() from someplace? Like, say, the starting stage of your quest?

Well, no, it was in the tutorial on the Wiki, and didn't think I had to do something else than add this line... What should I do?
User avatar
Rude_Bitch_420
 
Posts: 3429
Joined: Wed Aug 08, 2007 2:26 pm

Post » Sun Jun 17, 2012 7:53 pm

/bump :ermm:
User avatar
mike
 
Posts: 3432
Joined: Fri Jul 27, 2007 6:51 pm

Post » Mon Jun 18, 2012 9:10 am

Go over to the stages tab, and if you don't already have one, make a new stage (on the left). Set this as the startup stage. Then add a fragment to it that calls SomeFunction(). You'll need to select your quest script from the kmyQuest dropdown on top of the fragment box.

If any of this is unfamiliar, it's worth running through the quest design tutorials.

Which tutorial was this? I'm not seeing OnUpdate stuff in any of the tutorials, but that was just a cursory search...
User avatar
Dalton Greynolds
 
Posts: 3476
Joined: Thu Oct 18, 2007 5:12 pm

Post » Mon Jun 18, 2012 1:06 am

Here's what I get:
Starting 1 compile threads for 1 files...Compiling "QF_SAGPlayerInChargenQuest_01000D62"...c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_SAGPlayerInChargenQuest_01000D62.psc(8,0): SomeFunction is not a function or does not existNo output generated for QF_SAGPlayerInChargenQuest_01000D62, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on QF_SAGPlayerInChargenQuest_01000D62

Well it's not in a tutorial but in the EVENTS documentation I think...
User avatar
Clea Jamerson
 
Posts: 3376
Joined: Tue Jun 20, 2006 3:23 pm

Post » Sun Jun 17, 2012 6:51 pm

Did you select SAGPlayerInChargenMyScript from the dropdown? If so, then the actual call will be "kmyQuest.SomeFunction()".
User avatar
Emma Pennington
 
Posts: 3346
Joined: Tue Oct 17, 2006 8:41 am

Post » Sun Jun 17, 2012 10:18 pm

Did you select SAGPlayerInChargenMyScript from the dropdown? If so, then the actual call will be "kmyQuest.SomeFunction()".

Still does not work :nope:
Starting 1 compile threads for 1 files...Compiling "QF_SAGPlayerInChargenQuest_01000D62"...c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_SAGPlayerInChargenQuest_01000D62.psc(8,0): variable kMyQuest is undefinedc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_SAGPlayerInChargenQuest_01000D62.psc(8,9): none is not a known user-defined typeNo output generated for QF_SAGPlayerInChargenQuest_01000D62, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on QF_SAGPlayerInChargenQuest_01000D62

EDIT: I removed a line that appeared on SAGPlayerInChargenMyScript and it seems to compile now. I'll test in-game!
EDIT2: same problem as in the beginning - no message appears...
User avatar
Leah
 
Posts: 3358
Joined: Wed Nov 01, 2006 3:11 pm

Post » Sun Jun 17, 2012 5:53 pm

/bump :dry:
User avatar
Abel Vazquez
 
Posts: 3334
Joined: Tue Aug 14, 2007 12:25 am


Return to V - Skyrim