carcharhinidea Posted July 20, 2014 Share Posted July 20, 2014 (edited) okay, this is probably a fairly simple fix for someone experienced with scripting in the creation kit (I hope). but I've been stuck on it for a while now and I'm completely in the dark as to what I'm doing wrong. as for background. I wanted to add a interaction point (went for an activator) to the dawnguard vampire castle, where after certain quests the player could unlock the crafting for the various crossbows. to that end I placed an activator in the castle, and checked it out to see if it worked. so far, so good. then I started on the script, with the tutorial of the creation kit wiki pretty much right next to it. and I can't get the script to compile. whereas when I look at my script and at the tutorial I see no reason why it shouldn't work. I used the activator 'elderscrollchest' from the dawnguard dlc, because I liked the look of it, and copied it into it's own special object (which I named 'Vactivator1'); placed it in the cell I'd already altered with the reference ID of Schematicchest, and checked to see if it would still activate (which was an opening animation in this case). then I started by following that tutorial, and added the following script to it: Scriptname Vampireschematics extends ObjectReference {to get crossbows as a vampire} int steelact int dwarfact int dwarfenhact quest property DLC1vampirebaseintro auto quest property DLC1VQ03Vampire auto quest property DLC1Elder auto Objectreference property Schematicchest auto Event.Oncellattach objectreference.blockactivate endevent Event OnActivate(Schematicchest akactionref) Checkschematics Endevent Function Checkschematics steelact = GetStageDone DLC1vampirebaseintro 200 ;bloodstone chalice state dwarfact = GetStageDone DLC1VQ03Vampire 200 ;Prophet (vampire) state dwarfenhact = GetStageDone DLC1VQElder 200 ;seeking disclosiure state If steelact == 1 DLC1TechXbowSteelChanceNone.setvalue (0) ;allow enhanced steel crosbows to be made endif If dwarfact == 1 DLC1TechXbowDwarvenChanceNone.setvalue (0) ;allow dwarven crossbows to be made endif If dwarfenhact == 1 DLC1TechXbowDwarvenEnhancedChanceNone.setvalue (0) endif debug.messagebox("Test") Endfunction I know it's not pretty, and I had to google numerous times (man those tutorials are unhelpfull) but I see no reasons why it should give me the following errors: Starting 1 compile threads for 1 files... Compiling "Vampireschematics"... C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\Vampireschematics.psc(12,5): extraneous input '.' expecting ID C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\Vampireschematics.psc(0,0): error while attempting to read script Vampireschematics: De objectverwijzing is niet op een exemplaar van een object ingesteld. No output generated for Vampireschematics, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on VampireschematicsCompiling "Vampireschematics"... I'm guessing I made a mistake somewhere with the function, but I can't figure out why it's not working when I follow the functions as given on creationkit.com closely. the second error is slightly more baffling, as it basically says that the objectreference isn't set to a particular example of an object (which it is? I gave it the property Schematicchest, which is only bound to that one particular example of my new activator. I also encountered a few 'did not expect 'Event' was expecting FUNCTION errors, but those seem to have solved themselves now? basically, I'm completely lost, and googling the errors has proven unhelpful (especially the second one). I've been trying a bit more just the last minute or so, in the event.oncellattach block I tried changing objectreference to.. well.. vactivator1, Schematicchest, even it's form number. doesn't change the error. Edited July 20, 2014 by carcharhinidea Link to comment Share on other sites More sharing options...
Ghaunadaur Posted July 20, 2014 Share Posted July 20, 2014 1. Your script is missing some properties for the global variables that are used in the function. GlobalVariable property DLC1TechXbowSteelChanceNone auto GlobalVariable property DLC1TechXbowDwarvenChanceNone auto GlobalVariable property DLC1TechXbowDwarvenEnhancedChanceNone auto 2. The usage of GetStageDone is wrong. It returns a bool (true/false) not an integer. Actually you don't need the integer variables. If DLC1vampirebaseintro.GetStageDone(200) 3. There are tons of typos and syntax mistakes, like missing parenthesis etc., too many to list them all. Instead I will just post a corrected script that will at least compile. Scriptname Vampireschematics extends ObjectReference {to get crossbows as a vampire} quest property DLC1vampirebaseintro auto quest property DLC1VQ03Vampire auto quest property DLC1VQElder auto Objectreference property Schematicchest auto GlobalVariable property DLC1TechXbowSteelChanceNone auto GlobalVariable property DLC1TechXbowDwarvenChanceNone auto GlobalVariable property DLC1TechXbowDwarvenEnhancedChanceNone auto Event Oncellattach() Schematicchest.BlockActivation() endevent Event OnActivate(ObjectReference akactionref) Checkschematics() Endevent Function Checkschematics() If DLC1vampirebaseintro.GetStageDone(200) DLC1TechXbowSteelChanceNone.setvalue(0) ;allow enhanced steel crosbows to be made endif If DLC1VQ03Vampire.GetStageDone(200) DLC1TechXbowDwarvenChanceNone.setvalue(0) ;allow dwarven crossbows to be made endif If DLC1VQElder.GetStageDone(200) DLC1TechXbowDwarvenEnhancedChanceNone.setvalue (0) endif debug.messagebox("Test") EndFunction Link to comment Share on other sites More sharing options...
carcharhinidea Posted July 20, 2014 Author Share Posted July 20, 2014 (edited) okay? thanks! that should help me greatly! not just with this script, but in general I mean. Edited July 20, 2014 by carcharhinidea Link to comment Share on other sites More sharing options...
Recommended Posts