If I'm understanding the documentation for DeleteLines function correctly, it should work if I have a trigger call a function in my script file which calls the DeleteLines function. But it seems to be failing silently instead.
Steps to replicate:
1) Add a wrapper for DeleteLines to the script file.
2) Create a trigger that calls the wrapper (the one below matches calls the wrapper when a prompt is received).
Additional notes:
-I originally encountered the problem on version 5.06. To confirm this was not due to interaction with plugins/other code, I created a blank world in v5.07 pre-release with default settings other than checking the "Convert IAC EOR/GA to new line" option and the code shown above. I was playing Achaea
-Increasing the argument of DeleteLines to 2, 5, and 10 did not make a difference.
Thanks in advance.
Steps to replicate:
1) Add a wrapper for DeleteLines to the script file.
GagLines = function()
--print("deleting a line")
DeleteLines(1)
end
2) Create a trigger that calls the wrapper (the one below matches calls the wrapper when a prompt is received).
<triggers>
<trigger
enabled="y"
keep_evaluating="y"
match="^.+$"
regexp="y"
send_to="12"
sequence="100"
>
<send>local count = GetLineCount()
if count==GetInfo(289) then
GagLines()
end</send>
</trigger>
</triggers>
Additional notes:
-I originally encountered the problem on version 5.06. To confirm this was not due to interaction with plugins/other code, I created a blank world in v5.07 pre-release with default settings other than checking the "Convert IAC EOR/GA to new line" option and the code shown above. I was playing Achaea
-Increasing the argument of DeleteLines to 2, 5, and 10 did not make a difference.
Thanks in advance.