Fix minor doc error, throw error when attempting to assign a value to a non-existing global variable in lua

macos_ci_fix
Zackhasacat 1 year ago committed by Evil Eye
parent 6f4e7ed5dc
commit dd87d01f06

@ -140,7 +140,7 @@ namespace MWLua
= sol::overload([](const GlobalStore& store, std::string_view globalId, float val) {
auto g = store.search(ESM::RefId::deserializeText(globalId));
if (g == nullptr)
return;
throw std::runtime_error("No variable \"" + std::string(globalId) + "\" in GlobalStore");
char varType = MWBase::Environment::get().getWorld()->getGlobalVariableType(globalId);
if (varType == 's' || varType == 'l')
{

@ -930,7 +930,6 @@
-- Whether teleportation for this player is enabled.
-- @function [parent=#Player] isTeleportingEnabled
-- @param openmw.core#GameObject player
-- @param #boolean player
-- @return #boolean
---

Loading…
Cancel
Save