acidzebra Posted November 15, 2012 Share Posted November 15, 2012 (edited) Like I said, the script as I put it compiles just fine, zero errors. I tested it. I'm assuming you have a legal version of skyrim. In your 2nd example, withoutquest property CWE02 auto the compiler will have no idea what you are talking about. Edited November 15, 2012 by acidzebra Link to comment Share on other sites More sharing options...
ZunaSW Posted November 15, 2012 Author Share Posted November 15, 2012 Yes xD I have a legal version of Skyrim.Nothing, it doesn't work :( I made a lot of things, a lot of changes, but nothing. Always says the same errors. Link to comment Share on other sites More sharing options...
acidzebra Posted November 15, 2012 Share Posted November 15, 2012 (edited) If you have copied and pasted THIS script exactly as written and it still doesn't work, I don't know what to tell you. This compiles for me, that's all I can say. Scriptname CHANGEFORYOURSCRIPTNAME extends ObjectReference quest property CWE02 auto ObjectReference property CWFortSoldierImperialCWE auto Event OnLoad() Debug.Trace("Every object in this cell has loaded its 3d") if CWE02.IsRunning() CWFortSoldierImperialCWE.enable() endIf EndEvent Edited November 15, 2012 by acidzebra Link to comment Share on other sites More sharing options...
ZunaSW Posted November 15, 2012 Author Share Posted November 15, 2012 Ummm... Nothing, it doesn't work. Don't worry, I'm searching another way to make it work. You helped me a lot, thanks :) Link to comment Share on other sites More sharing options...
Ghaunadaur Posted November 15, 2012 Share Posted November 15, 2012 The script posted by acidzebra should compile without errors, whether the event will fire is another thing. So where did you put the script on? A trigger box? If so, OnLoad() may not work, since a trigger box has no 3d. Try using OnCellAttach(). With a trigger box, you could also use OnTriggerEnter() event: Scriptname CHANGEFORYOURSCRIPTNAME extends ObjectReference quest property CWE02 auto ObjectReference property CWFortSoldierImperialCWE auto Event OnTriggerEnter(ObjectReference akActionRef) if akActionRef == Game.GetPlayer() && CWE02.IsRunning() Debug.Trace("We entered the trigger") CWFortSoldierImperialCWE.enable() endIf EndEvent Just make sure the player actually enters the trigger. Link to comment Share on other sites More sharing options...
ZunaSW Posted November 15, 2012 Author Share Posted November 15, 2012 (edited) For now I'm making the script in a reference in Render Window, I don't know where I will put it. What is a trigger box? Sorry, I never mod Oblivion if it was in the game xD. That I want is:For now, the npc of the spawn isn't in the world. The player talks with a guy, who gives a quest to the player. When the player enters in the cell where is the spawn, and the player have the quest active, the spawn works and spawn the npc.I think I have to put the script in the spawn reference, but I'm not sure.About the script, nothing, it doesn't work, I have the same errors. Can be it because my steam account is spanish? or anything about the lenguage of my programs and OS?Ahh!! And I compile the script in Creation Kit. Have I to compile in other program? Edited November 15, 2012 by ZunaSW Link to comment Share on other sites More sharing options...
Ghaunadaur Posted November 15, 2012 Share Posted November 15, 2012 Okay, step by step. Which errors are you getting? Please post them. Did you change the script name to match your script? Compiling with the CK is perfectly right, doesn't matter which language your game or OS is. Link to comment Share on other sites More sharing options...
steve40 Posted November 15, 2012 Share Posted November 15, 2012 (edited) Yes xD I have a legal version of Skyrim.Nothing, it doesn't work :( I made a lot of things, a lot of changes, but nothing. Always says the same errors. If you copied AcidZebra's or Ghaunadaur's script exactly and it won't compile (IsRunning is not a function error), then Quest.pex is missing or broken. Edited November 15, 2012 by steve40 Link to comment Share on other sites More sharing options...
ZunaSW Posted November 16, 2012 Author Share Posted November 16, 2012 Well, I make a script, and if I put a function in my script and the script is like this: Scriptname CWE02newscript extends ObjectReference quest property CWE02 auto ObjectReference property CWFortSoldierImperialCWE auto int count Event OnLoad() if player.isinfaction(CWSonsFaction) endif CWFortSoldierImperialCWE.enable() endEvent endFunction I get this error: Starting 1 compile threads for 1 files...Compiling "CWE02newscript"...e:\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\CWE02newscript.psc(13,0): missing EOF at 'endFunction'No output generated for CWE02newscript, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on CWE02newscript Then, If I delete the function and the script is like this: Scriptname CWE02newscript extends ObjectReference quest property CWE02 auto ObjectReference property CWFortSoldierImperialCWE auto Event OnLoad() if player.isinfaction(CWSonsFaction) endif CWFortSoldierImperialCWE.enable() endEvent I get this errors: Starting 1 compile threads for 1 files...Compiling "CWE02newscript"...e:\steam\steamapps\common\skyrim\Data\Scripts\Source\CWE02.psc(3,15): cannot name a variable or property the same as a known type or scripte:\steam\steamapps\common\skyrim\Data\Scripts\Source\CWE02.psc(6,10): IsRunning is not a function or does not existe:\steam\steamapps\common\skyrim\Data\Scripts\Source\CWE02.psc(6,10): cannot call the member function IsRunning alone or on a type, must call it on a variablee:\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\CWE02newscript.psc(3,15): cannot name a variable or property the same as a known type or scripte:\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\CWE02newscript.psc(7,7): variable player is undefinede:\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\CWE02newscript.psc(7,26): variable CWSonsFaction is undefinede:\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\CWE02newscript.psc(7,14): none is not a known user-defined typeNo output generated for CWE02newscript, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on CWE02newscript I know how to solve the three final errors, but the four first errors I don't know.And yes, I change the script to try if it works with other events. And I made a new script called "CWE02newscript". Link to comment Share on other sites More sharing options...
Ghaunadaur Posted November 16, 2012 Share Posted November 16, 2012 (edited) I don't think you need a function. A function makes sense if you want to execute some piece of code many times, which isn't the case with your script. Then, you can't just use player as a variable. It has to be declared somewhere, either as a property or inside the event block using Actor player = game.GetPlayer(). Oh, and why is your script using isinfaction() now? I thought it was meant to check if a quest is running. Scriptname CWE02newscript extends ObjectReference Faction Property CWSonsFaction auto ObjectReference property CWFortSoldierImperialCWE auto Event OnLoad() Actor player = Game.GetPlayer() if player.isinfaction(CWSonsFaction) CWFortSoldierImperialCWE.enable() endif endEvent I'm not getting those first 4 errors, there must went something wrong on your side. Try to rename the property CWE02 to any other name. Edited November 17, 2012 by Ghaunadaur Link to comment Share on other sites More sharing options...
Recommended Posts