Or thisCode:g_app.setForegroundPaneMaxFps
And to getCode:g_app.setBackgroundPaneMaxFps
Or thisCode:g_app.getForegroundPaneFps
Code:g_app.getBackgroundPaneFps
function FPSlimit()
if g_app.getForegroundPaneFps <= 10 then
g_app.setForegroundPaneMaxFps(60)
modules.game_textmessage.displayFailureMessage(tr('FPSlimit OFF!'))
else
g_app.setForegroundPaneMaxFps(10)
modules.game_textmessage.displayFailureMessage(tr('FPSlimit ON!'))
end
end
function FPSlimit()
if g_app.getForegroundPaneFps() <= 10 then
g_app.setForegroundPaneMaxFps(60)
modules.game_textmessage.displayFailureMessage(tr('FPSlimit OFF!'))
else
g_app.setForegroundPaneMaxFps(10)
modules.game_textmessage.displayFailureMessage(tr('FPSlimit ON!'))
end
end
Add () to the end of g_app.getForegroundPaneFps?
Sorry I am just guessingLUA:function FPSlimit() if g_app.getForegroundPaneFps() <= 10 then g_app.setForegroundPaneMaxFps(60) modules.game_textmessage.displayFailureMessage(tr('FPSlimit OFF!')) else g_app.setForegroundPaneMaxFps(10) modules.game_textmessage.displayFailureMessage(tr('FPSlimit ON!')) end end
![]()
I think foreground fps is for Framework and the background for game fps. Try to change it. Also I'm thinking for what is that function? I don't see any logic reason behind it.