INNER CODE UNIT · Go
failArgumentCount
bbuck/dragon-mud · scripting/lua_engine.go:178
func failArgumentCount(state *lua.State, index int, expectedType string) {
if !state.IsNumber(index) {
state.PushString(
fmt.Sprintf(
"Argument #%d expected %s, but received %s",
index,
expectedType,
state.TypeOf(index),
),
)
state.Error()
}
}
type number interface {
float32 | float64 | int | int8 | int16 | int32 | int64
}