raulfin Posted July 25, 2014 Share Posted July 25, 2014 (edited) Would one of you fine folks mind taking a look a this script for me, on compile it's giving errors on the ints in the ifs & a none error on the quest.stop(). I'm pretty new to scripting so pretty sure I missed something basic. Pastebin - sourcePastebin - errors Edited July 25, 2014 by raulfin Link to comment Share on other sites More sharing options...
IsharaMeradin Posted July 25, 2014 Share Posted July 25, 2014 You have used GetRandomPercent. This is a condition function not a papyrus function. If you want to obtain a random percentage, you'll need to do something like the following (not tested) Float RandomPercent = Utility.RandomFloat(0.0,1.0)Int RandomPercentInt = (RandomPercent * 100) as int I believe if you resolve this misuse of a condition function, the rest of your errors should go away. Link to comment Share on other sites More sharing options...
raulfin Posted July 25, 2014 Author Share Posted July 25, 2014 (edited) That cleared up a lot and showed up a few typos and such, now it's just giving these 2 errors; this error for lines 24-64C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\scripts\Source\DIE_ASIS.psc(27,5): type mismatch while assigning to a int (cast missing or types unrelated) and these on the quest.stop()C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\scripts\Source\DIE_ASIS.psc(329,1): variable RaulDIELevelUpQuest is undefinedC:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\scripts\Source\DIE_ASIS.psc(329,21): none is not a known user-defined typeHelps to have actually defined the quest... :) Edited July 25, 2014 by raulfin Link to comment Share on other sites More sharing options...
IsharaMeradin Posted July 25, 2014 Share Posted July 25, 2014 Your source script has undoubtedly changed. Pretty certain that those line #s don't match up to what you posted earlier. Link to comment Share on other sites More sharing options...
raulfin Posted July 25, 2014 Author Share Posted July 25, 2014 (edited) I just posted the updated script and errors to the same links. I didn't change the storing variables section, just pretty much everything below it. Edited July 25, 2014 by raulfin Link to comment Share on other sites More sharing options...
IsharaMeradin Posted July 25, 2014 Share Posted July 25, 2014 int sw0 = ASISSpawnWeight0.getvalue() GetValue is for floatsGetValueInt is for ints I suspect you want to use GetValueInt. Link to comment Share on other sites More sharing options...
raulfin Posted July 25, 2014 Author Share Posted July 25, 2014 (edited) Thank you very much! :dance: Batch compile of 1 files finished. 1 succeeded, 0 failed. Can finally start on some beta testing to see if it actually does what i want it to! Edited July 25, 2014 by raulfin Link to comment Share on other sites More sharing options...
IsharaMeradin Posted July 25, 2014 Share Posted July 25, 2014 LOL Nothing like working the kinks out of a really large script only to find that it doesn't do what you want it to do. Good luck! Link to comment Share on other sites More sharing options...
raulfin Posted July 25, 2014 Author Share Posted July 25, 2014 (edited) Aaaaaaaaaand it doesn't work. I think it may be in how I'm trying to change the value of the global; int sw3 = ASISSpawnWeight3.GetValue() As Int if (sw3 != 0) && (swu != 0) && (random <= swc) ASISSpawnWeight3.setvalue(sw3+swu) Endif if (sw0 > 0) && (HM != 0) && (sw6 || sw7 || sw8 || sw9 > 0) && (random <= roc) ASISSpawnWeight0.setvalue(sw0-(swu*2)) EndIf where swu is a stored player set variable. All the globals are set as floats.or it could be the random itself; int random = Utility.RandomInt(0, 100) I have also tried doing; int random = Utility.RandomInt(0, 1) Int Ran = (random * 100) as int if (sw3 != 0) && (swu != 0) && (ran <= swc) ASISSpawnWeight3.setvalue(sw3+swu) Endif Edited July 25, 2014 by raulfin Link to comment Share on other sites More sharing options...
IsharaMeradin Posted July 25, 2014 Share Posted July 25, 2014 If you are working with integers instead of floats, use SetValueInt I am surprised that the compiler did not catch it, but I guess because an int can be treated as a float it did not think it an issue. Link to comment Share on other sites More sharing options...
Recommended Posts