WoF: fix Lua type error with cast to number (#8773)
Lua was getting this variable without being told it is a number rather than a string. On some systems it is interpreted as a string which breaks this monster spawner code and throws Lua error messages onto the player's screen.
This commit is contained in:
parent
a8194ee764
commit
b3a8d02774
1 changed files with 1 additions and 1 deletions
|
@ -122,7 +122,7 @@
|
|||
[if]
|
||||
[lua]
|
||||
code=<< local t = ...
|
||||
return (mathx.random() < t.rate) >>
|
||||
return (mathx.random() < tonumber(t.rate)) >>
|
||||
[args]
|
||||
rate={RATE}
|
||||
[/args]
|
||||
|
|
Loading…
Add table
Reference in a new issue