hunterrock Posted August 5, 2014 Share Posted August 5, 2014 Hi, I am trying to change ASIS to only spawn added spawns in interiors. The kind people on the ASIS page have helped me out a lot but there are a few kinks left. This is the section of the script. The part in bold and underlined is what I have been told to add. Int Function getSpawnNum()If Not IsInInterior()Return 0EndIf;Grab all the values from the globals.multiplier = ASISSpawnMult.GetValue()Bool reducedInteriorSpawns = ASISUseInteriorSpawns.GetValue() As BoolIf reducedInteriorSpawns == True && IsInInterior()interiorSpawns = ASISIntSpawnsReduceFactor.GetValue()ElseinteriorSpawns = 1EndIf spawn0weight = (ASISSpawnWeight0.GetValue() )spawn1weight = (ASISSpawnWeight1.GetValue() * multiplier / interiorSpawns) + spawn0weightspawn2weight = (ASISSpawnWeight2.GetValue() * multiplier / interiorSpawns) + spawn1weightspawn3weight = (ASISSpawnWeight3.GetValue() * multiplier / interiorSpawns) + spawn2weightspawn4weight = (ASISSpawnWeight4.GetValue() * multiplier / interiorSpawns) + spawn3weightspawn5weight = (ASISSpawnWeight5.GetValue() * multiplier / interiorSpawns) + spawn4weightspawn6weight = (ASISSpawnWeight6.GetValue() * multiplier / interiorSpawns) + spawn5weightspawn7weight = (ASISSpawnWeight7.GetValue() * multiplier / interiorSpawns) + spawn6weightspawn8weight = (ASISSpawnWeight8.GetValue() * multiplier / interiorSpawns) + spawn7weightspawn9weight = (ASISSpawnWeight9.GetValue() * multiplier / interiorSpawns) + spawn8weight ;Debug.MessageBox("Spawn9Weight: " + spawn9weight as String) ;Roll the random numbers.Float xSize = 0xSize = Utility.RandomFloat(1, spawn9weight)If xSize <= spawn0weightReturn 0ElseIf xSize <= spawn1weightReturn 1ElseIf xSize <= spawn2weightReturn 2ElseIf xSize <= spawn3weightReturn 3ElseIf xSize <= spawn4weightReturn 4ElseIf xSize <= spawn5weightReturn 5ElseIf xSize <= spawn6weightReturn 6ElseIf xSize <= spawn7weightReturn 7ElseIf xSize <= spawn8weightReturn 8ElseIf xSize <= spawn9weightReturn 9EndIfReturn 0EndFunction So I have done this, and set up the scriptcompiler.bat to point to my directory. No problem there. Go to compile the script and I get the error: No viable alternative at input 'Not' This is from line 137 which is - If Not IsInInterior() Now I am guessing I need an else if somewhere, but I have no idea. Please could someone tell me what to include in the script to let it work/compile? I am a very novice modder and this is my first venture into scripting but I am enjoying it and will be extremely grateful for any assistance. Many Thanks Link to comment Share on other sites More sharing options...
Ceruulean Posted August 5, 2014 Share Posted August 5, 2014 it should be if !IsInInterior()the exclamation point(!) means "not" Link to comment Share on other sites More sharing options...
hunterrock Posted August 5, 2014 Author Share Posted August 5, 2014 Thank you, compiled perfectly. Much appreciated :) Link to comment Share on other sites More sharing options...
Recommended Posts