mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix incorrect error message during Lua archiving
This commit is contained in:
parent
7f969705b4
commit
ef1ff6c94b
1 changed files with 1 additions and 9 deletions
|
|
@ -1413,21 +1413,13 @@ static void ArchiveTables(UINT8 **p)
|
||||||
// Write key
|
// Write key
|
||||||
e = ArchiveValue(p, TABLESINDEX, -2); // key should be either a number or a string, ArchiveValue can handle this.
|
e = ArchiveValue(p, TABLESINDEX, -2); // key should be either a number or a string, ArchiveValue can handle this.
|
||||||
if (e == 2) // invalid key type (function, thread, lightuserdata, or anything we don't recognise)
|
if (e == 2) // invalid key type (function, thread, lightuserdata, or anything we don't recognise)
|
||||||
{
|
CONS_Alert(CONS_ERROR, "Index '%s' (%s) of table %d could not be archived!\n", lua_tostring(gL, -2), luaL_typename(gL, -2), i);
|
||||||
lua_pushvalue(gL, -2);
|
|
||||||
CONS_Alert(CONS_ERROR, "Index '%s' (%s) of table %d could not be archived!\n", lua_tostring(gL, -1), luaL_typename(gL, -1), i);
|
|
||||||
lua_pop(gL, 1);
|
|
||||||
}
|
|
||||||
// Write value
|
// Write value
|
||||||
e = ArchiveValue(p, TABLESINDEX, -1);
|
e = ArchiveValue(p, TABLESINDEX, -1);
|
||||||
if (e == 1)
|
if (e == 1)
|
||||||
n++; // the table contained a new table we'll have to archive. :(
|
n++; // the table contained a new table we'll have to archive. :(
|
||||||
else if (e == 2) // invalid value type
|
else if (e == 2) // invalid value type
|
||||||
{
|
|
||||||
lua_pushvalue(gL, -2);
|
|
||||||
CONS_Alert(CONS_ERROR, "Type of value for table %d entry '%s' (%s) could not be archived!\n", i, lua_tostring(gL, -1), luaL_typename(gL, -1));
|
CONS_Alert(CONS_ERROR, "Type of value for table %d entry '%s' (%s) could not be archived!\n", i, lua_tostring(gL, -1), luaL_typename(gL, -1));
|
||||||
lua_pop(gL, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
lua_pop(gL, 1);
|
lua_pop(gL, 1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue