Project Zomboid

Project Zomboid

Did I Have A Car?
Another Error Console
When I spawn in a new save, if I am far from any car, an error pops up every time I move even slightly.

Here is the console error:


`attempted index: getScriptName of non-table: null
function: checkingVehicles -- file: MyCar.lua line # 118 | MOD: Did I Have A Car?
function: myCar_vehicleSpawn -- file: MyCar.lua line # 183 | MOD: Did I Have A Car?
java.lang.RuntimeException: attempted index: getScriptName of non-table: null
at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1667)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:624)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:173)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1963)
at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1790)
at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
at zombie.Lua.Event.trigger(Event.java:81)
at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:315)
at zombie.characters.IsoPlayer.updateInternal2(IsoPlayer.java:2428)
at zombie.characters.IsoPlayer.updateInternal1(IsoPlayer.java:2192)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:102)
at zombie.characters.IsoPlayer.update(IsoPlayer.java:2180)
at zombie.MovingObjectUpdateSchedulerUpdateBucket.update(MovingObjectUpdateSchedulerUpdateBucket.java:71)
at zombie.MovingObjectUpdateScheduler.update(MovingObjectUpdateScheduler.java:155)
at zombie.iso.IsoCell.ProcessObjects(IsoCell.java:3058)
at zombie.GameProfiler.invokeAndMeasure(GameProfiler.java:195)
at zombie.iso.IsoCell.updateInternal(IsoCell.java:5955)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:102)
at zombie.iso.IsoCell.update(IsoCell.java:5897)
at zombie.iso.IsoWorld.updateWorld(IsoWorld.java:3954)
at zombie.iso.IsoWorld.updateInternal(IsoWorld.java:4054)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:102)
at zombie.iso.IsoWorld.update(IsoWorld.java:3978)
at zombie.gameStates.IngameState.updateInternal(IngameState.java:1750)
at zombie.gameStates.IngameState.update(IngameState.java:1443)
at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:101)
at zombie.GameWindow.logic(GameWindow.java:377)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:76)
at zombie.GameWindow.frameStep(GameWindow.java:924)
at zombie.GameWindow.run_ez(GameWindow.java:817)
at zombie.GameWindow.mainThread(GameWindow.java:615)
at java.base/java.lang.Thread.run(Unknown Source)
`

I interpret this as the game searching for a car every time I move and failing to find one. Shouldn’t it only check for a car once at spawn?

Edit: forgot to mencion that the pop-ups stop once a car is found, at which point I receive the key and my character says something.
Last edited by Zatrox; 31 Jan @ 5:57am