mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Modernize lua read (part 2 & 3): C++ templating assurance (#7410)
* Modernize lua read (part 2 & 3): C++ templating assurance Implement the boolean reader Implement the string reader Also remove unused & unimplemented script_error_handler Add a reader with default value
This commit is contained in:
parent
227c71eb76
commit
eef62c82a2
35 changed files with 247 additions and 154 deletions
|
@ -508,7 +508,7 @@ int ModApiItemMod::l_register_item_raw(lua_State *L)
|
|||
std::string name;
|
||||
lua_getfield(L, table, "name");
|
||||
if(lua_isstring(L, -1)){
|
||||
name = lua_tostring(L, -1);
|
||||
name = readParam<std::string>(L, -1);
|
||||
verbosestream<<"register_item_raw: "<<name<<std::endl;
|
||||
} else {
|
||||
throw LuaError("register_item_raw: name is not defined or not a string");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue