1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

Merge branch 'fix_my_errors' into 'master'

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

See merge request OpenMW/openmw!3548
This commit is contained in:
Evil Eye 2023-11-03 16:31:23 +00:00
commit eb0ddf72d8
2 changed files with 1 additions and 2 deletions

View File

@ -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')
{

View File

@ -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
---