runtime error: invalid memory address or nil pointer dereference
goroutine 1 [running, locked to thread]:
github.com/yuin/gopher-lua.(*LState).PCall.func1(0x91b488, 0x1304e960, 0x142dbbd4, 0x0, 0x0, 0x0)
/code/go/src/github.com/yuin/gopher-lua/state.go:1975 +0x563
panic(0x8aa0a0, 0x7ec340)
/usr/lib/go-1.13/src/runtime/panic.go:679 +0x162
main.(*System).fight(0x7f0880, 0x13016100)
/code/src/system.go:1739 +0x4af
main.systemScriptInit.func79.2(0xc, 0x91b5d4, 0x7f0880)
/code/src/script.go:1487 +0x1c9
main.systemScriptInit.func79(0x1304e960, 0x0)
/code/src/script.go:1513 +0x330
github.com/yuin/gopher-lua.callGFunction(0x1304e960, 0x0, 0x13253700)
/code/go/src/github.com/yuin/gopher-lua/vm.go:202 +0x31
github.com/yuin/gopher-lua.init.3.func26(0x1304e960, 0x7c500601, 0x131b2000, 0x0)
/code/go/src/github.com/yuin/gopher-lua/vm.go:817 +0x356
github.com/yuin/gopher-lua.mainLoop(0x1304e960, 0x131b2000)
/code/go/src/github.com/yuin/gopher-lua/vm.go:31 +0xc4
github.com/yuin/gopher-lua.(*LState).callR(0x1304e960, 0x0, 0xffffffff, 0x0)
/code/go/src/github.com/yuin/gopher-lua/state.go:1202 +0x18d
github.com/yuin/gopher-lua.(*LState).Call(...)
/code/go/src/github.com/yuin/gopher-lua/state.go:1954
github.com/yuin/gopher-lua.(*LState).PCall(0x1304e960, 0x0, 0xffffffff, 0x0, 0x9c1ac0, 0x13a99fa0)
/code/go/src/github.com/yuin/gopher-lua/state.go:2017 +0xe9
github.com/yuin/gopher-lua.(*LState).DoFile(0x1304e960, 0x13121ae0, 0x18, 0x1304e960, 0x0)
/code/go/src/github.com/yuin/gopher-lua/auxlib.go:394 +0x93
main.main()
/code/src/main.go:432 +0x1b76
stack traceback:
[G]: in function 'game'
external/script/main.lua:1004: in main chunk
[G]: ?