TangerineDog Posted September 26, 2016 Share Posted September 26, 2016 When I write a new script and hit OK, it starts to compile and comes up with this error shortly afterwards: Starting 1 compile threads for 1 files...Compiling "SCriptHunger01"...<unknown>(0,0): Assembly failedNo output generated for ScriptHunger01, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on ScriptHunger01 The script is: Event OnActivate(ObjectReference akActionRef) endEvent So really nothing intricate... How can I fix this? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted September 26, 2016 Share Posted September 26, 2016 Go step by step through your process. Everything from what program you used to write the script in through to where you compiled your script at. There are multiple places you can write a script and multiple ways of compiling a script. Knowing your exact process will help in determining what could have gone wrong. My initial guess is that you may not have Scriptname ScriptHunger01 Extends ObjectReference or similar at the top of your script. But that shouldn't happen if you created the script completely in the Creation Kit as it creates that line for you. Link to comment Share on other sites More sharing options...
TangerineDog Posted September 26, 2016 Author Share Posted September 26, 2016 Unfortunately, I'm way past going through my process as I've gone through it propably 20 times already. My script aside, what would be the correct way of creating a script in the CreationKit? And please don't post links to the Wiki, I've been through all the Papyrus pages already to no avail, I posted here after 5 hours worth of research. Link to comment Share on other sites More sharing options...
mrpwn Posted September 26, 2016 Share Posted September 26, 2016 (edited) Did you extract the source files from Scripts.rar in \Skyrim\Data? Edited September 26, 2016 by mrpwn Link to comment Share on other sites More sharing options...
TangerineDog Posted September 26, 2016 Author Share Posted September 26, 2016 (edited) I did that, too. I had some success just now, though, when I a) changed the %1 in the ScriptCompile.bat to the name of my script (which I had saved manually as a .psc in the source folder) and the output directory to my desktop - seems to be an issue with my security settings for my game folder. It compiled just fine. Now I tried to compile my actual script, which is: ScriptName ScriptHunger01 extends activemagiceffect Event OnEffectFinish(Actor Target, Actor Caster)If Target == Game.GetPlayer()Target.AddSpell(SpellHunger02)EndifEndEvent But SpellHunger02, of course, is an unknown variable. I'm currently using only Notepad++, no CK, but I've created the Spell SpellHunger02 in the CK.Now how can I define SpellHunger02 as a variable in Notepad++ that, when the script added to an effect in the CK, points to my Spell SpellHunger02? Edited September 26, 2016 by TangerineDog Link to comment Share on other sites More sharing options...
TangerineDog Posted September 26, 2016 Author Share Posted September 26, 2016 (edited) I tried putting SPELL Property SpellHunger02 Auto above the event. Now, when I try to compile it, it's the same old <unknown> (0,0) error all over again. EDIT: Not, of course, if I remove that new line. Any other ideas? Edited September 26, 2016 by TangerineDog Link to comment Share on other sites More sharing options...
IsharaMeradin Posted September 26, 2016 Share Posted September 26, 2016 ScriptName ScriptHunger01 extends activemagiceffect Spell Property SpellHunger02 Auto Event OnEffectFinish(Actor Target, Actor Caster) If Target == Game.GetPlayer() Target.AddSpell(SpellHunger02) Endif EndEvent That should be what your PSC would look like. Once compiled, you need to assign the spell you created in the Creation Kit to the property. You do this by going to the record where you have attached the script, click the properties button and use the new window that appears to select the property and then edit the assigned value. I have never heard of any issues with the %1 in the Script Compiler.bat file before. Can't help with that. Link to comment Share on other sites More sharing options...
TangerineDog Posted September 26, 2016 Author Share Posted September 26, 2016 (edited) I ran the .bat as admin when I compiled the script you posted - that worked. Then I tried to add it to my magic effect - that failed, it said it had "errors while loading". Then I ran the CK as admin and tried again - that worked! I added the spell in the properties and it seems to work, too, although I haven't tested it yet in the game. It might be a few days, but I'll post my findings here so if anybody has the same problem, they'll have confirmation if this is the way to solve them and if there are any follow-up problems (and how to solve these eventually as well, I hope...). You guys have helped me very much! Thanks! Edited September 26, 2016 by TangerineDog Link to comment Share on other sites More sharing options...
IsharaMeradin Posted September 26, 2016 Share Posted September 26, 2016 Out of curiosity, where did you install Steam, Skyrim and the Creation Kit? Link to comment Share on other sites More sharing options...
TangerineDog Posted September 26, 2016 Author Share Posted September 26, 2016 In C\Users\MyName\Steam. Little update: I added the spell SpellHunger01 (it's an ability) to my character. The duration of the included effect EffectHunger01 is set to 10s. The above mentioned script is tied to the effect. When I receive the spell, the effect counts down its 10 seconds, then nothing happens :( Link to comment Share on other sites More sharing options...
Recommended Posts