ERROR: expected number or table
stack traceback:
[C]: in function 'SetUnitLosState'
[string "LuaRules/Gadgets/neutralizer.lua"]:41: in function 'GameFrame'
[string "LuaGadgets/gadgets.lua"]:926: in function <[string "LuaGadgets/gadgets.lua"]:924>
(tail call): ?
Which I presume means that it didn't find that function. Or did I just not provide the correct arguments to the callout?
Path: /trunk/rts/
Rev: 5907 - Go to most recent revision
Last modification: Rev 5907 - trepan - 2008-05-18 04:13:53 +0200 (Sun, 18 May 2008)
Log message:
* Added the following LuaSyncedCtrl call-outs:
- SetUnitLosMask(unitID, allyTeamID, number | table) -> nil
- SetUnitLosState(unitID, allyTeamID, number | table) -> nil
- If a mask bit is enabled, than the engine will not update
the corresponding state bit (think of them as 'lock' bits)
- If a table is used, entries should be of the form:
{ string = boolean } -- 'false' to clear, 'true' to set
ex: SetUnitLosState(3, 2, { los = true, radar = false })
- The valid strings are 'los', 'radar', 'prevLos', and 'contRadar'
prevLos: previous LOS
contRadar: continuous radar (since prevLos contact)
*** These 2 dictate whether or not a unit type is known
* Replaced LOS_INTEAM with the LOS_xxx_MASK bits
* Changed the losStatus array from 'int' to 'unsigned short'
* Minimap and UnitDrawer now rely on the losStatus for unit
visibility, and do not take the allyTeam shortcut
It looks like english, but I couldn't say for sure.
Er, yeah, that's what I needed, thanks Pxtl. That's not English, it's coder-speak for, "do this stuff, stupid".
I was thinking I'd try implementing a new LOS system in Lua that wasn't frame-bound, in case anybody's wondering, see how that works. I'll get to it Sunday, I have IRL stuff to take care of today / tonight / Saturday.