MF99K Posted February 24, 2016 Share Posted February 24, 2016 I made a mod that involves a pengull variant, but I had to create a new code for the brain since part of the code related to the rookery was telling them to go northwest forever. The mod was working fine earlier, but now if I attack them I get this error: Quote SimLuaProxy::QueryServer()[string "scripts/util.lua"]:417: attempt to index local 'v1' (a number value)LUA ERROR stack traceback:scripts/util.lua:417 in () ? (Lua) <403-421> v1 = -59.428546905518 v2 = (-59.10, 0.00, 134.33) v3 = nil v4 = nil=(tail call):-1 in () (tail) <-1--1>scripts/behaviours/wander.lua:94 in (method) IsFarFromHome (Lua) <92-97> self = waittime = 46.686740916682 lastresult = RUNNING parent = table: 0x23703150 homepos = -59.428546905518 walking = false nextupdatetime = 46.686740916682 inst = 108311 - flameguin (valid:true) times = table: 0x23363810 status = RUNNING name = Wander maxdist = 5 far_from_home = falsescripts/behaviours/wander.lua:37 in (method) Visit (Lua) <29-59> self = waittime = 46.686740916682 lastresult = RUNNING parent = table: 0x23703150 homepos = -59.428546905518 walking = false nextupdatetime = 46.686740916682 inst = 108311 - flameguin (valid:true) times = table: 0x23363810 status = RUNNING name = Wander maxdist = 5 far_from_home = falsescripts/behaviourtree.lua:601 in (method) Visit (Lua) <554-610> self = idx = 13 lasttime = 44.700002331287 name = Priority status = RUNNING period = 0.25 children = table: 0x20a51110 lastresult = RUNNING time = 44.933335676789 do_eval = false oldidx = 13 child = table: 0x2335e840scripts/behaviourtree.lua:22 in (method) Update (Lua) <20-27> self = root = table: 0x23703150 inst = 108311 - flameguin (valid:true) forceupdate = falsescripts/brain.lua:212 in (method) OnUpdate (Lua) <205-214> self = bt = *** failed to evaluate *** events = table: 0x220c89c0 behaviourqueue = table: 0x225514d0 stopped = false inst = 108311 - flameguin (valid:true)scripts/brain.lua:135 in (method) Update (Lua) <105-147> self = hibernaters = table: 0x10596dc0 updaters = table: 0x10596da0 tickwaiters = table: 0x10597140 instances = table: 0x10597120 current_tick = 1348 waiters = table: 0x270cd340 k = *** failed to evaluate *** v = truescripts/update.lua:213 in () ? (Lua) <150-223> dt = 0.033333335071802 tick = 1348 i = 1348[string "scripts/util.lua"]:417: attempt to index local 'v1' (a number value)LUA ERROR stack traceback: scripts/util.lua:417 in () ? (Lua) <403-421> =(tail call):-1 in () (tail) <-1--1> scripts/behaviours/wander.lua:94 in (method) IsFarFromHome (Lua) <92-97> scripts/behaviours/wander.lua:37 in (method) Visit (Lua) <29-59> scripts/behaviourtree.lua:601 in (method) Visit (Lua) <554-610> scripts/behaviourtree.lua:22 in (method) Update (Lua) <20-27> scripts/brain.lua:212 in (method) OnUpdate (Lua) <205-214> scripts/brain.lua:135 in (method) Update (Lua) <105-147> scripts/update.lua:213 in () ? (Lua) <150-223> CURL ERROR: <url> malformed I'm very certain this has something to do with part of the code I disabled, but I have no idea where the part of broken code is since the file with the issue isn't mentioned in the error log. flameguinbrain.lua <== pretty sure this is the file with the issue since it's the only part that's been changed recently. Link to comment https://forums.kleientertainment.com/forums/topic/64740-probably-brain-related-crash-needs-fixing/ Share on other sites More sharing options...
Muche Posted February 25, 2016 Share Posted February 25, 2016 Try --- flameguinbrain.lua +++ flameguinbrain.fix.lua @@ -410,7 +410,7 @@ Wander( self.inst, self.inst.components.knownlocations:GetLocation("myegg") or self.inst.components.knownlocations:GetLocation("herd") or - self.inst.Transform:GetWorldPosition(), + Vector3(self.inst.Transform:GetWorldPosition()), MAX_WANDER_DIST), StandStill(self.inst), Link to comment https://forums.kleientertainment.com/forums/topic/64740-probably-brain-related-crash-needs-fixing/#findComment-726459 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now