Fix: bad LUA functions (by sevenfm)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8254 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2016-06-18 21:30:39 +00:00
parent 503523a9fa
commit 0955d6ddfd
2 changed files with 11 additions and 11 deletions
+9 -9
View File
@@ -1199,18 +1199,18 @@ void IniFunction(lua_State *L, BOOLEAN bQuests )
lua_register(L, "ActionDoorClose", l_Action_door_close);
//------Fact and Quest------
if ( bQuests = TRUE )
if ( bQuests == TRUE )
{
lua_register(L, "SetFactTrue", l_SetFactTrue);
lua_register(L, "SetFactFalse", l_SetFactFalse);
lua_register(L, "SetFactTrue", l_SetFactTrue);
lua_register(L, "SetFactFalse", l_SetFactFalse);
}
lua_register(L, "CheckFact", l_CheckFact);
lua_register(L, "CheckQuest", l_gubQuest);
if ( bQuests = TRUE )
if ( bQuests == TRUE )
{
lua_register(L, "StartQuest", l_StartQuest);
lua_register(L, "EndQuest", l_EndQuest);
lua_register(L, "StartQuest", l_StartQuest);
lua_register(L, "EndQuest", l_EndQuest);
}
lua_register(L, "gubFact", l_gubFact);
lua_register(L, "GetgubFact", l_GetgubFact);
@@ -7445,8 +7445,8 @@ static int l_SetGlobalLuaBool (lua_State *L)
UINT32 val = lua_tointeger(L,1);
BOOLEAN set = lua_toboolean(L,2);
// Flugente: I assume '<= 1000' is meant here...
if ( val >= 0 && val <= 1000 )
// Flugente: I assume '< 1000' is meant here...
if ( val < 1000 )
gLuaGlobal[val].fGlobalLuaBool = set;
}
@@ -7460,7 +7460,7 @@ static int l_SetGlobalLuaVal (lua_State *L)
UINT32 val = lua_tointeger(L,1);
INT32 set = lua_tointeger(L,2);
if ( val >=0 || 1000<= val )
if ( val < 1000 )
gLuaGlobal[val].iGlobalLuaVal = set;
}
return 0;
+2 -2
View File
@@ -179,8 +179,8 @@ void LuaTacticalSetup(lua_State *L)
lua_setglobal( L, SOLDIER_CLASS); // We also want this class to be known to the script
// Create a soldier list type and create its object
lua_createtable (L, 256, 0);
for (int sold=0; sold < 256; sold++)
lua_createtable( L, TOTAL_SOLDIERS, 0 );
for ( int sold = 0; sold < TOTAL_SOLDIERS; ++sold )
{
lua_pushinteger( L, sold);
if (MercPtrs[ sold ] )