Hello,
I have a window (MWin) when I click on a button, it changes to an other view (MiniMWin).I want to save the pos of MiniMWindow on savestate, only problem is when the MiniMWin hasn't been used yet it causes a problem.
My code:
error :
[string "Plugin"]:383: bad argument #2 to 'SetVariable' (string expected, got nil)
stack traceback:
[C]: in function 'SetVariable'
[string "Plugin"]:383: in function <[string "Plugin"]:379>
I know why it's giving the error just not how to solve it proper.
What would be the way to solve this?
Hope this makes sense.
Orogan
I have a window (MWin) when I click on a button, it changes to an other view (MiniMWin).I want to save the pos of MiniMWindow on savestate, only problem is when the MiniMWin hasn't been used yet it causes a problem.
My code:
function OnPluginSaveState ()
SetVariable ("TopMiniWin", WindowInfo (MiniMWin, 11))
SetVariable ("LeftMiniWin", WindowInfo (MiniMWin, 10))
end -- OnPluginSaveState
error :
[string "Plugin"]:383: bad argument #2 to 'SetVariable' (string expected, got nil)
stack traceback:
[C]: in function 'SetVariable'
[string "Plugin"]:383: in function <[string "Plugin"]:379>
I know why it's giving the error just not how to solve it proper.
What would be the way to solve this?
Hope this makes sense.
Orogan