TesseractE Posted August 15, 2015 Share Posted August 15, 2015 (edited) I decided to try my hand at creating a mod the other day. I've gotten the conversation options in place by following the CK tutorial, but I'm a little lost on how to give the reward to the player. I've created a new Spell Tome item (labelled 'SpellTomeC' here), and tried to insert the following code: Game.GetPlayer().AddItem(SpellTomeC, 1) But when I try to compile, I get the following Error. Starting 1 compile threads for 1 files...Compiling "TIF__010022F8"...C:\Games\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__010022F8.psc(9,25): variable SpellTomeC is undefinedNo output generated for TIF__010022F8, compilation failed. I'm probably missing something simple, but I haven't been able to find any hints elsewhere that work. Any thoughts? Edited August 15, 2015 by TesseractE Link to comment Share on other sites More sharing options...
MotoSxorpio Posted August 15, 2015 Share Posted August 15, 2015 Scripts.rar could be your issue. Backup everything, extract your script.rar.... Link to comment Share on other sites More sharing options...
TesseractE Posted August 15, 2015 Author Share Posted August 15, 2015 Scripts.rar could be your issue. Backup everything, extract your script.rar.... I actually already did that when I was getting a different error. This started immediately after that, but I thought it progress over the old error. Link to comment Share on other sites More sharing options...
TesseractE Posted August 15, 2015 Author Share Posted August 15, 2015 OK, I think I've worked out the error, but it's not quite functional yet. I added Quest Aliases for the Item and the NPC that grants it. Then I moved the code to trigger on a Quest Stage instead of a Dialogue prompt, and changed it to this: Game.GetPlayer().AddItem(Alias_SpellTomeC.GetReference()) I no longer get an error when I compile, but I think some of my other logic might be off because I was unable to get the dialogue prompt that's supposed to show up when you bring him the items he asked for and that causes the item to be granted. I'll poke into it and check back here. I'll probably have more questions as I go... I'll just re-use this thread if I do. ^^d Link to comment Share on other sites More sharing options...
FrankFamily Posted August 15, 2015 Share Posted August 15, 2015 About your original problem, did you define the property spelltomeC ? might be easier than making an alias for it. Link to comment Share on other sites More sharing options...
TesseractE Posted August 16, 2015 Author Share Posted August 16, 2015 (edited) About your original problem, did you define the property spelltomeC ? might be easier than making an alias for it.How would I do that? I'm all for simplifying the process. Right now, everything else with the conversation tree is working except for granting the item. When I tried to do it manually via console in-game, it didn't work at all. Wondering if there's a different problem at work here. Mousing over the item in the Object Window gives me the ID of 010022F9. player.additem 010022F9 1 did not work ( Item '010022F9' not found for parameter ObjectID ), though. Is this the actual ID number? Is this something that would be fixed by going this other route of defining properties rather than aliases? Edited August 16, 2015 by TesseractE Link to comment Share on other sites More sharing options...
Recommended Posts