mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
chore(ui): clarify LUA_TNIL check in FrameScript_Object::SetScript
This commit is contained in:
parent
034e9d0915
commit
749273e217
@ -143,7 +143,7 @@ void FrameScript_Object::RunScript(ScriptIx const& script, int32_t argCount, con
|
||||
}
|
||||
|
||||
int32_t FrameScript_Object::SetScript(lua_State* L) {
|
||||
if (!lua_isstring(L, 2) || lua_type(L, 3) != LUA_TFUNCTION && lua_type(L, 3)) {
|
||||
if (!lua_isstring(L, 2) || lua_type(L, 3) != LUA_TFUNCTION && lua_type(L, 3) != LUA_TNIL) {
|
||||
return luaL_error(L, "Usage: %s:SetScript(\"type\", function)", this->GetDisplayName());
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user