Looking for some advice on Scripting: What do these errors m

Post » Sun Jun 17, 2012 6:34 pm

Just today, I got the creation kit, and I've started working on the scripts for a big mod I'm working on. After about 30 minutes of work, I got a rough version that covered most of the stuff I wanted, and removed all of the compiling errors, all but two that is, and I have no idea what to do about those. The script is post directly below, after that, I posted the errors I got


Scriptname cohTransformTiming extends Quest
{Controls the Timing for transformation.}
short cohGetMoonPhase
floor cohPhaseDay
int cohCanTransform
int cohbmvar
cohGetMoonPhase = (( GameDaysPassed + ( GetCurrentTime / 24 ) - 0.5 ) % 24 )
cohGetMoonPhase = cohPhaseDay / 3
;/List of moon phases returned by cohGetMoonPhase calculation
0 = full moon
1 = 3/4 waning
2 = half waning
3 = 1/4 waning
4 = new moon
5 = 1/4 waxing
6 = half waxing
7 = 3/4 waxing/;
If GetCurrentTime >= 20 || GetCurrentTime <= 6 && cohPhaseDay = 1 && cohbmvar != 1
cohWWtimingQuest.SetQuestStage 5
cohCanTransform = 1
elseif GetCurrentTime >= 20 || GetCurrentTime <= 6 && cohbmvar = 1
cohWWtimingQuest.SetQuestStage 10
cohCanTransform = 1
elseif GetCurrentTime <= 20 || GetCurrentTime >= 6
cohWWtimingQuest.setQuestStage 0
cohCanTransform = 0
endif
if GetGlobalValue PlayerIsWerewolf = 1
if cohCanTransform = 1
player.addmagiceffect WerewolfChangeEffect
elseif cohCanTransform = 0
player.removemagiceffect WerewolfChangeEffect
endif
endif
end





Obviously some of the syntax is wrong, but I have absolutely no idea what the errors it's returning mean. We may all be new to this, but I'd appreciate any help I get.

Starting 1 compile threads for 1 files...
Compiling "cohTransformTiming"...
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(7,16): no viable alternative at input '='
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(29,0): missing EOF at 'if'
No output generated for cohTransformTiming, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on cohTransformTiming
User avatar
Javier Borjas
 
Posts: 3392
Joined: Tue Nov 13, 2007 6:34 pm

Post » Sun Jun 17, 2012 2:58 pm

When do you expect the script to run? Papyrus allows you to listen for various Event types - http://www.creationkit.com/Papyrus
User avatar
BethanyRhain
 
Posts: 3434
Joined: Wed Oct 11, 2006 9:50 am

Post » Mon Jun 18, 2012 12:28 am

You know, I get the feeling the above was an automated response. I still have no idea what those error messages mean, and can't find any pages on the wiki detailing what they mean.
User avatar
JERMAINE VIDAURRI
 
Posts: 3382
Joined: Tue Dec 04, 2007 9:06 am

Post » Sun Jun 17, 2012 5:06 pm

You need to add an event to your script. If I remember correctly, code outside of events and other functions can only be declarative.

You got those errors because the compiler expected to find declarative code, but found something else instead.

Cipscis
User avatar
Pumpkin
 
Posts: 3440
Joined: Sun Jun 25, 2006 10:23 am

Post » Sun Jun 17, 2012 2:56 pm

Oh, I see. Wouldn't have hurt the Beth guy to explain that the event thing was the problem I was having, though I imagine he's really busy.
User avatar
NeverStopThe
 
Posts: 3405
Joined: Tue Mar 27, 2007 11:25 pm

Post » Mon Jun 18, 2012 1:04 am

There's some great documentation of Papyrus on the http://www.creationkit.com that does a good job of explaining it. Take a look at the links from the http://www.creationkit.com/Category:Papyrus page.

Cipscis
User avatar
Brittany Abner
 
Posts: 3401
Joined: Wed Oct 24, 2007 10:48 pm

Post » Mon Jun 18, 2012 3:03 am

I actually have. I can't seem to figure out what event I need to do to make this function like global scripts did back in tesscript days, or even how to replicate the function of the old Begin Gamemode block.
User avatar
Sunny Under
 
Posts: 3368
Joined: Wed Apr 11, 2007 5:31 pm

Post » Sun Jun 17, 2012 5:09 pm

Nope, not automated!

Take a look at http://www.creationkit.com/Differences_from_Previous_Scripting. It's written specifically to help folks who are familiar with the older language learn how to transition to working in Papyrus.
User avatar
Haley Merkley
 
Posts: 3356
Joined: Sat Jan 13, 2007 12:53 pm

Post » Sun Jun 17, 2012 2:02 pm

Alright, I used OnUpdate for the event, it sounds like Gamemode

Scriptname cohTransformTiming extends Quest
{Controls the Timing for transformation.}
short cohGetMoonPhase
floor cohPhaseDay
int cohCanTransform
int cohbmvar
Event OnUpdate
RegisterForUpdate(5.0)
cohGetMoonPhase = (( GameDaysPassed + ( GetCurrentTime / 24 ) - 0.5 ) % 24 )
cohGetMoonPhase = cohPhaseDay / 3
;/List of moon phases returned by cohGetMoonPhase calculation
0 = full moon
1 = 3/4 waning
2 = half waning
3 = 1/4 waning
4 = new moon
5 = 1/4 waxing
6 = half waxing
7 = 3/4 waxing/;
If GetCurrentTime >= 20 || GetCurrentTime <= 6 && cohPhaseDay = 1 && cohbmvar != 1
cohWWtimingQuest.SetQuestStage 5
cohCanTransform = 1
elseif GetCurrentTime >= 20 || GetCurrentTime <= 6 && cohbmvar = 1
cohWWtimingQuest.SetQuestStage 10
cohCanTransform = 1
elseif GetCurrentTime <= 20 || GetCurrentTime >= 6
cohWWtimingQuest.setQuestStage 0
cohCanTransform = 0
endif
if GetGlobalValue PlayerIsWerewolf = 1
if cohCanTransform = 1
player.addmagiceffect WerewolfChangeEffect
elseif cohCanTransform = 0
player.DispelSpell WerewolfChangeEffect
endif
endif
EndEvent
end


Now its giving me two new errors.

Starting 1 compile threads for 1 files...
Compiling "cohTransformTiming"...
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(7,14): mismatched input '\\r\\n' expecting LPAREN
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(0,0): error while attempting to read script cohTransformTiming: Object reference not set to an instance of an object.
No output generated for cohTransformTiming, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on cohTransformTiming
User avatar
Syaza Ramali
 
Posts: 3466
Joined: Wed Jan 24, 2007 10:46 am

Post » Sun Jun 17, 2012 11:56 am

You have no parentheses following your OnUpdate()
User avatar
Alada Vaginah
 
Posts: 3368
Joined: Sun Jun 25, 2006 8:31 pm

Post » Sun Jun 17, 2012 6:49 pm

oops. Thanks for the quick and nonautomated or copy-pasted response.
User avatar
Darrell Fawcett
 
Posts: 3336
Joined: Tue May 22, 2007 12:16 am

Post » Sun Jun 17, 2012 8:24 pm

Event OnUpdate


c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(7,14): mismatched input '\\r\\n' expecting LPAREN

Hiya - just a Papyrus Noobie like the rest of us, but I'm guessing this is because that 'OnUpdate' needs '()' after it, like "Event OnUpdate()"
"mismatched input '\\r''n' expecting LPAREN" sounds like it hit return/newline (that is the end of the line) but was expecting a left parenthesis, "("?

Just a guess, but it seems plausible. And it might get rid of the other error too, if it's caused by the fact the compiler didn't recognise your 'event onUpdate' line...


Edit... damn! ninja'd! :ph34r:
Edit2: but at least it seems I was right!
User avatar
Hot
 
Posts: 3433
Joined: Sat Dec 01, 2007 6:22 pm

Post » Sun Jun 17, 2012 7:21 pm

Well, I've whittled things down to just and handfull of errors, one of which is intentional since I'm looking up how to make a script check an actor (the player in this case) for a magic effect, and two of which are incorrect syntax (looking at the questmaking pages now to find the change quest stage command)

Scriptname cohTransformTiming extends Quest
{Controls the Timing for transformation.}
short cohGetMoonPhase
floor cohPhaseDay
int cohCanTransform
int cohbmvar
Event OnUpdate()
RegisterForUpdate(5.0)
cohGetMoonPhase = (( GameDaysPassed + ( GetCurrentTime / 24 ) - 0.5 ) % 24 )
cohGetMoonPhase = cohPhaseDay / 3
;/List of moon phases returned by cohGetMoonPhase calculation
0 = full moon
1 = 3/4 waning
2 = half waning
3 = 1/4 waning
4 = new moon
5 = 1/4 waxing
6 = half waxing
7 = 3/4 waxing/;
If GetCurrentTime >= 20 || GetCurrentTime <= 6
cohWWtimingQuest.SetQuestStage 5
cohCanTransform = 1
elseif GetCurrentTime <= 20 || GetCurrentTime >= 6
cohWWtimingQuest.setQuestStage 0
cohCanTransform = 0
endif
if GetGlobalValue(PlayerIsWerewolf = 1)
if cohCanTransform = 1
player.addmagiceffect(WerewolfChangeEffect)
elseif player.
player.DispelSpell(WerewolfChangeEffect)
endif
endif
EndEvent

returns error message.

Starting 1 compile threads for 1 files...
Compiling "cohTransformTiming"...
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(21,17): no viable alternative at input 'SetQuestStage'
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(24,17): no viable alternative at input 'setQuestStage'
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(28,3): no viable alternative at input 'cohCanTransform'
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(30,14): no viable alternative at input '\\r\\n'
No output generated for cohTransformTiming, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on cohTransformTiming


PS: Thanks for the help everyone who's posted on this thread.
User avatar
Amelia Pritchard
 
Posts: 3445
Joined: Mon Jul 24, 2006 2:40 am

Post » Sun Jun 17, 2012 8:35 pm

Forms can't be referred to directly by their editorIDs in Papyrus. You'll need to create a property, and assign the appropriate form as that property's value in the dialogue window of the scripted form in the Creation Kit.

If I remember correctly, by naming a property the same as the form you need it to use, its default value will be that form.

Cipscis
User avatar
Elisha KIng
 
Posts: 3285
Joined: Sat Aug 18, 2007 12:18 am

Post » Sun Jun 17, 2012 1:17 pm

You mean like this?

Scriptname cohTransformTiming extends Quest
{Controls the Timing for transformation.}
short property cohGetMoonPhase
_cohGetMoonPhase
floor property cohPhaseDay
_cohPhaseDay
int property cohCanTransform
_cohCanTransform
int property cohbmvar
_cohbmvar
Event OnUpdate()
RegisterForUpdate(5.0)
while GetGlobalValue(PlayerIsWerewolf = 1)
cohGetMoonPhase = (( GameDaysPassed + ( GetCurrentTime / 24 ) - 0.5 ) % 24 )
cohGetMoonPhase = cohPhaseDay / 3
;/List of moon phases returned by cohGetMoonPhase calculation
0 = full moon
1 = 3/4 waning
2 = half waning
3 = 1/4 waning
4 = new moon
5 = 1/4 waxing
6 = half waxing
7 = 3/4 waxing/;
If GetCurrentTime >= 20 || GetCurrentTime <= 6
SetStage(5)
cohCanTransform = 1
elseif GetCurrentTime <= 20 || GetCurrentTime >= 6
SetStage(0)
cohCanTransform = 0
endif
EndWhile
if GetGlobalValue(PlayerIsWerewolf = 1)
if cohCanTransform = 1
player.addmagiceffect(WerewolfChangeEffect)
elseif player.
player.DispelSpell(WerewolfChangeEffect)
endif
endif
EndEvent



It seems to be working better, but its still returning 2 errors.

Starting 1 compile threads for 1 files...
Compiling "cohTransformTiming"...
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(4,16): mismatched input '\\r\\n' expecting FUNCTION
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(0,0): error while attempting to read script cohTransformTiming: Object reference not set to an instance of an object.
No output generated for cohTransformTiming, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on cohTransformTiming
User avatar
Annick Charron
 
Posts: 3367
Joined: Fri Dec 29, 2006 3:03 pm

Post » Sun Jun 17, 2012 12:34 pm

No, you'll want to use syntax like this for declaring properties:
Quest property cohWWtimingQuest auto
The "auto" keyword tells the compiler to auto-generate get and set functions for your property. Your lines like this are invalid, and were causing that error:
_cohGetMoonPhase

Cipscis
User avatar
Adriana Lenzo
 
Posts: 3446
Joined: Tue Apr 03, 2007 1:32 am

Post » Sun Jun 17, 2012 10:21 pm

Nice, that's one problem down, and it looks likes there's just one thing in the way.


Scriptname cohTransformTiming extends Quest
{Controls the Timing for transformation.}
short property cohGetMoonPhase auto
floor property cohPhaseDay auto
bool property cohCanTransform auto
bool property cohbmvar auto
Event OnUpdate()
RegisterForUpdate(5.0)
cohGetMoonPhase = (( GameDaysPassed + ( GetCurrentTime / 24 ) - 0.5 ) % 24 )
cohGetMoonPhase = cohPhaseDay / 3
;/List of moon phases returned by cohGetMoonPhase calculation
0 = full moon
1 = 3/4 waning
2 = half waning
3 = 1/4 waning
4 = new moon
5 = 1/4 waxing
6 = half waxing
7 = 3/4 waxing/;
If GetCurrentTime >= 20 || GetCurrentTime <= 6 && cohPhaseDay = 1
SetStage(5)
cohCanTransform = true
elseif GetCurrentTime <= 20 || GetCurrentTime >= 6 && cohPhaseDay = 0
SetStage(0)
cohCanTransform = false
endif
if GetGlobalValue(PlayerIsWerewolf = 1)
if cohCanTransform = true
player.addmagiceffect(WerewolfChangeEffect)
elseif
player.
player.DispelSpell(WerewolfChangeEffect)
endif
endif
EndEvent


Starting 1 compile threads for 1 files...
Compiling "cohTransformTiming"...
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(20,50): no viable alternative at input 'cohPhaseDay'
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(23,54): no viable alternative at input 'cohPhaseDay'
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(28,3): no viable alternative at input 'cohCanTransform'
No output generated for cohTransformTiming, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on cohTransformTiming
User avatar
Noely Ulloa
 
Posts: 3596
Joined: Tue Jul 04, 2006 1:33 am

Post » Sun Jun 17, 2012 1:02 pm

Ah, that looks like it's due to your using a single = operator (which signifies assignment) instead of a double equals operator (==, which signifies direct comparison).

You'll also need to change this line:
if GetGlobalValue(PlayerIsWerewolf = 1)
To something like this:
if GetGlobalValue(PlayerIsWerewolf) == 1

There might be another issue or two, but it's hard to tell when reading unformatted code (just so you know, BBCode's "code" tags can help with that - quote my post for a preview), and the compiler should let us know if there are any remaining problems.

Cipscis
User avatar
Laura Simmonds
 
Posts: 3435
Joined: Wed Aug 16, 2006 10:27 pm

Post » Sun Jun 17, 2012 8:43 pm

Scriptname cohTransformTiming extends Quest Hidden{Controls the Timing for transformation.}short property cohGetMoonPhase autofloor property cohPhaseDay autobool property cohCanTransform autobool property cohbmvar autoEvent OnUpdate()RegisterForUpdate(5.0)cohGetMoonPhase = (( GameDaysPassed + ( GetCurrentTime / 24 ) - 0.5 ) % 24 )cohGetMoonPhase = cohPhaseDay / 3;/List of moon phases returned by cohGetMoonPhase calculation0 = full moon1 = 3/4 waning2 = half waning3 = 1/4 waning4 = new moon5 = 1/4 waxing6 = half waxing7 = 3/4 waxing/;If GetCurrentTime >= 20 || GetCurrentTime <= 6 && cohPhaseDay = 1SetStage(5)cohCanTransform == trueelseif GetCurrentTime <= 20 || GetCurrentTime >= 6 && cohPhaseDay = 0SetStage(0)cohCanTransform == falseendifif GetGlobalValue(PlayerIsWerewolf) == 1if cohCanTransform == trueplayer.addmagiceffect(WerewolfChangeEffect)SetGlobalValue(BeastFormTimer 10000)elseif player.addmagiceffect(WerewolfChangeEffect) != 1 && cohCanTransform = falseplayer.DispelSpell(WerewolfChangeEffect)endifendifEndEvent

Ah thanks. I knew that == was necessary in tesscript, but I was under the impression that you just used single = signs for whatever reason. Still getting those errors though...

Starting 1 compile threads for 1 files...Compiling "cohTransformTiming"...c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(20,50): no viable alternative at input 'cohPhaseDay'c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(22,20): required (...)+ loop did not match anything at input '=='c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(23,54): no viable alternative at input 'cohPhaseDay'c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(30,15): no viable alternative at input 'BeastFormTimer'c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(30,35): required (...)+ loop did not match anything at input ')'c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(31,59): no viable alternative at input 'cohCanTransform'No output generated for cohTransformTiming, compilation failed.
User avatar
Skrapp Stephens
 
Posts: 3350
Joined: Mon Aug 06, 2007 5:04 am

Post » Sun Jun 17, 2012 9:59 pm

oops. Herpaderp. I forgot to save the script after adding in the =='s

There's only one error now, and it looks as if its due to me not knowing the right name for a global variable.
User avatar
Kristina Campbell
 
Posts: 3512
Joined: Sun Oct 15, 2006 7:08 am

Post » Sun Jun 17, 2012 4:04 pm

damnit, right when I though it was working everything metaphorically exploded.

criptname cohTransformTiming extends Quest Hidden{Controls the Timing for transformation.}short property cohGetMoonPhase autofloor property cohPhaseDay autobool property cohCanTransform autobool property cohbmvar autoEvent OnUpdate()RegisterForUpdate(5.0)cohGetMoonPhase = (( GameDaysPassed + ( GetCurrentTime / 24 ) - 0.5 ) % 24 )cohPhaseDay = cohGetMoonPhase / 3;/List of moon phases returned by cohGetMoonPhase calculation0 = full moon1 = 3/4 waning2 = half waning3 = 1/4 waning4 = new moon5 = 1/4 waxing6 = half waxing7 = 3/4 waxing/;If GetCurrentTime >= 20 || GetCurrentTime <= 6 && cohPhaseDay == 1SetStage(5)cohCanTransform == trueelseif GetCurrentTime <= 20 || GetCurrentTime >= 6 && cohPhaseDay == 0SetStage(0)cohCanTransform == falseendifif GetGlobalValue(PlayerIsWerewolf) == 1if cohCanTransform == trueplayer.addmagiceffect(WerewolfChangeEffect)elseif player.addmagiceffect(WerewolfChangeEffect) != 1 && cohCanTransform == falseplayer.DispelSpell(WerewolfChangeEffect)endifendifEndEvent


returns a ton of errors.




Starting 1 compile threads for 1 files...Compiling "cohTransformTiming"...c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(3,15): unknown type shortc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(4,15): unknown type floorc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(9,21): variable GameDaysPassed is undefinedc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(9,40): variable GetCurrentTime is undefinedc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(9,55): cannot divide a none from a int (cast missing or types unrelated)c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(9,36): cannot add a none to a none (cast missing or types unrelated)c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(9,62): cannot subtract a none from a float (cast missing or types unrelated)c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(9,70): Cannot calculate the modulus of non-integersc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(10,30): cannot divide a short from a int (cast missing or types unrelated)c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(10,0): type mismatch while assigning to a floor (cast missing or types unrelated)c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(20,3): variable GetCurrentTime is undefinedc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(20,18): cannot compare a none to a int (cast missing or types unrelated)c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(20,18): cannot relatively compare variables to Nonec:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(20,27): variable GetCurrentTime is undefinedc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(20,42): cannot compare a none to a int (cast missing or types unrelated)c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(20,42): cannot relatively compare variables to Nonec:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(20,62): cannot compare a floor to a int (cast missing or types unrelated)c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(23,7): variable GetCurrentTime is undefinedc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(23,22): cannot compare a none to a int (cast missing or types unrelated)c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(23,22): cannot relatively compare variables to Nonec:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(23,31): variable GetCurrentTime is undefinedc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(23,46): cannot compare a none to a int (cast missing or types unrelated)c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(23,46): cannot relatively compare variables to Nonec:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(23,66): cannot compare a floor to a int (cast missing or types unrelated)c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(27,18): variable PlayerIsWerewolf is undefinedc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(27,3): GetGlobalValue is not a function or does not existc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(27,36): cannot compare a none to a int (cast missing or types unrelated)c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(29,0): variable player is undefinedc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(29,22): variable WerewolfChangeEffect is undefinedc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(29,7): none is not a known user-defined typec:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(30,7): variable player is undefinedc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(30,29): variable WerewolfChangeEffect is undefinedc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(30,14): none is not a known user-defined typec:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(30,51): cannot compare a none to a int (cast missing or types unrelated)c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(31,0): variable player is undefinedc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(31,19): variable WerewolfChangeEffect is undefinedc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\cohTransformTiming.psc(31,7): none is not a known user-defined typeNo output generated for cohTransformTiming, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on cohTransformTiming
User avatar
laila hassan
 
Posts: 3476
Joined: Mon Oct 09, 2006 2:53 pm

Post » Sun Jun 17, 2012 2:57 pm

Cool, it looks like the syntax errors are all sorted. Now just go through one by one:
- You want "int", not "short"
- You want "float", not "floor"
- Check if you need to import anything for the "unrecognised" stuff
- You have one or more "undefined variable" errors. Remember global variables require properties, instead of referring to them straight by editorID

Cipscis
User avatar
My blood
 
Posts: 3455
Joined: Fri Jun 16, 2006 8:09 am

Post » Sun Jun 17, 2012 5:18 pm

Oh yeah, importing, I probably need to do that for the script commands that aren't being recognized...How exactly would I go about declaring a property for the global variables though?


As for the import, it would just go

import GetCurrentTime
import GameDaysPassed (though actually that's not the right script command, I'm not sure which one is at this point.)
User avatar
Brittany Abner
 
Posts: 3401
Joined: Wed Oct 24, 2007 10:48 pm

Post » Sun Jun 17, 2012 4:55 pm

Just checked the wiki, and http://www.creationkit.com/GetCurrentTime is a console-only function. GameDaysPassed is a global variable, so you'll need another property of type Global to access it.

For imports, which it looks like you won't need to use, you would have needed to use the parent script. For example:
import Game

Cipscis
User avatar
Adam Baumgartner
 
Posts: 3344
Joined: Wed May 30, 2007 12:12 pm

Post » Sun Jun 17, 2012 11:58 pm

Ah, thanks...Wait, the magic effects are all still listed as undefined...

And how am I supposed to check the time if its console only? Certainly there must be some stock quests and scripts that are time dependant! But of course there are, and obviously this is on the wiki somewhere...Though I'm not sure where.
User avatar
Code Affinity
 
Posts: 3325
Joined: Wed Jun 13, 2007 11:11 am

Next

Return to V - Skyrim