Re: Possible to tell AI to use a Supply Truck to help allies?
Posted: Sat Nov 17, 2018 9:55 pm
New Problem i encounter:
when i start a map and Slot 1 is empty you get a LUA error:
NOTE: i call "Multi0" - "p1" and "Multi1" - "p2"
Fatal Lua Error:
Stack Traceback
===============
(2) global C function 'error'
(3) Lua function '(anonymous)' at file 'C:\Program Files (x86)\OpenRA\/lua/sandbox.lua:150' (best guess)
Local variables:
arg = nil
ok = boolean: false
result = string: "[string \"simcity.lua\"]:12: attempt to index global 'p1' (a nil value)"
(4) tail call
(5) Lua function '?' at line 23 of chunk '"scriptwrapper.lua"]'
(6) global C function 'xpcall'
(7) Lua upvalue 'TryRunSandboxed' at line 23 of chunk '"scriptwrapper.lua"]'
Local variables:
fn = Lua function '(anonymous)' (defined at line 1 of chunk "simcity.lua"])
(8) Lua function '?' at line 31 of chunk '"scriptwrapper.lua"]'
Error message
===============
C:\Program Files (x86)\OpenRA\/lua/sandbox.lua:150: [string "simcity.lua"]:12: attempt to index global 'p1' (a nil value)
===============
bei OpenRA.Scripting.ScriptContext.FatalError(String message)
bei System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
bei System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
bei System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
bei Eluant.LuaRuntime.MethodWrapper.Invoke(Object[] parms)
bei Eluant.LuaRuntime.MakeManagedCall(IntPtr state, MethodWrapper wrapper)
bei Eluant.LuaRuntime.MethodWrapperCallCallback(IntPtr state)
bei Eluant.LuaRuntime.MethodWrapperCallCallbackWrapper(IntPtr state)
bei Eluant.LuaApi.lua_pcall(IntPtr L, Int32 nargs, Int32 nresults, Int32 errfunc)
bei Eluant.LuaRuntime.Call(IList`1 args)
bei Eluant.LuaRuntime.Call(LuaFunction fn, IList`1 args)
bei Eluant.LuaFunction.Call(IList`1 args)
bei OpenRA.Scripting.ScriptContext.WorldLoaded()
bei OpenRA.Mods.Common.Scripting.LuaScript.OpenRA.Traits.IWorldLoaded.WorldLoaded(World world, WorldRenderer worldRenderer)
bei OpenRA.World.LoadComplete(WorldRenderer wr)
bei OpenRA.Game.StartGame(String mapUID, WorldType type)
bei OpenRA.Network.UnitOrders.ProcessOrder(OrderManager orderManager, World world, Int32 clientId, Order order)
bei OpenRA.Network.OrderManager.TickImmediate()
bei OpenRA.Sync.<CheckSyncUnchanged>c__AnonStorey0.<>m__0()
bei OpenRA.Sync.CheckSyncUnchanged[T](World world, Func`1 fn)
bei OpenRA.Sync.CheckSyncUnchanged(World world, Action fn)
bei OpenRA.Game.InnerLogicTick(OrderManager orderManager)
bei OpenRA.Game.LogicTick()
bei OpenRA.Game.Loop()
bei OpenRA.Game.Run()
bei OpenRA.Game.InitializeAndRun(String[] args)
bei OpenRA.WindowsLauncher.RunGame(String[] args)
bei OpenRA.WindowsLauncher.Main(String[] args)
when i start a map and Slot 1 is empty you get a LUA error:
NOTE: i call "Multi0" - "p1" and "Multi1" - "p2"
Fatal Lua Error:
Stack Traceback
===============
(2) global C function 'error'
(3) Lua function '(anonymous)' at file 'C:\Program Files (x86)\OpenRA\/lua/sandbox.lua:150' (best guess)
Local variables:
arg = nil
ok = boolean: false
result = string: "[string \"simcity.lua\"]:12: attempt to index global 'p1' (a nil value)"
(4) tail call
(5) Lua function '?' at line 23 of chunk '"scriptwrapper.lua"]'
(6) global C function 'xpcall'
(7) Lua upvalue 'TryRunSandboxed' at line 23 of chunk '"scriptwrapper.lua"]'
Local variables:
fn = Lua function '(anonymous)' (defined at line 1 of chunk "simcity.lua"])
(8) Lua function '?' at line 31 of chunk '"scriptwrapper.lua"]'
Error message
===============
C:\Program Files (x86)\OpenRA\/lua/sandbox.lua:150: [string "simcity.lua"]:12: attempt to index global 'p1' (a nil value)
===============
bei OpenRA.Scripting.ScriptContext.FatalError(String message)
bei System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
bei System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
bei System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
bei Eluant.LuaRuntime.MethodWrapper.Invoke(Object[] parms)
bei Eluant.LuaRuntime.MakeManagedCall(IntPtr state, MethodWrapper wrapper)
bei Eluant.LuaRuntime.MethodWrapperCallCallback(IntPtr state)
bei Eluant.LuaRuntime.MethodWrapperCallCallbackWrapper(IntPtr state)
bei Eluant.LuaApi.lua_pcall(IntPtr L, Int32 nargs, Int32 nresults, Int32 errfunc)
bei Eluant.LuaRuntime.Call(IList`1 args)
bei Eluant.LuaRuntime.Call(LuaFunction fn, IList`1 args)
bei Eluant.LuaFunction.Call(IList`1 args)
bei OpenRA.Scripting.ScriptContext.WorldLoaded()
bei OpenRA.Mods.Common.Scripting.LuaScript.OpenRA.Traits.IWorldLoaded.WorldLoaded(World world, WorldRenderer worldRenderer)
bei OpenRA.World.LoadComplete(WorldRenderer wr)
bei OpenRA.Game.StartGame(String mapUID, WorldType type)
bei OpenRA.Network.UnitOrders.ProcessOrder(OrderManager orderManager, World world, Int32 clientId, Order order)
bei OpenRA.Network.OrderManager.TickImmediate()
bei OpenRA.Sync.<CheckSyncUnchanged>c__AnonStorey0.<>m__0()
bei OpenRA.Sync.CheckSyncUnchanged[T](World world, Func`1 fn)
bei OpenRA.Sync.CheckSyncUnchanged(World world, Action fn)
bei OpenRA.Game.InnerLogicTick(OrderManager orderManager)
bei OpenRA.Game.LogicTick()
bei OpenRA.Game.Loop()
bei OpenRA.Game.Run()
bei OpenRA.Game.InitializeAndRun(String[] args)
bei OpenRA.WindowsLauncher.RunGame(String[] args)
bei OpenRA.WindowsLauncher.Main(String[] args)