1. #1
    New Member Follow User Gallery
    Join Date
    Sep 2018
    Posts
    5

    Default Bug with ISwitch command???

    Hey guys,

    I'm having a problem with the ISwitch command. I'm getting an error message that the command must be a Top Level command however it is not placed within another command. I'm wondering if anybody else has run across this and/or if this is a bug. This is the command that I'm trying to execute.


    [ISwitch,"Tool:Models:Load Rim Right"
    ,0,"Press this to view your current rim light",
    [Loop,20,
    [IPress,Tool:SubTool:SelectUp]
    ]
    [VarDef,filelocation,""]
    [VarDef,filename,""]
    [VarSet,filelocation,[GetActiveToolPath]]
    [VarSet,filename,[StrMerge,filelocation,"R2.ZLI"]]
    [IPress,Material:Metal 01]
    [IPress,Draw:M]
    [IPress,Color:FillObject]
    [IPress,Tool:SubTool:SelectDown]
    [IPress,Color:FillObject]
    [IPress,Tool:SubTool:SelectUp]
    [If,
    [FileExists,filename] > 0,
    [FileNameSetNext,filename][IPress,Light:Load],
    [FileNameSetNext,"C:/ArtifactRenders/ZLights02.ZLI"][IPress,Light:Load]
    ]
    [IUnPress,Draw:M]

    ,
    [Loop,20,
    [IPress,Tool:SubTool:SelectUp]
    ]
    [IPress,Edit:Tool:Undo]
    [IPress,Tool:SubTool:SelectDown]
    [IPress,Edit:Tool:Undo]
    ,,.1]

    Any help would be appreciated, thank you.

  2. #2
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    Hi,

    There's nothing obviously wrong with your code, except you're not using [ISubPalette] to create the new "Models" sub-palette. Could you post the whole zscript text file so I can take a look?

    Thanks,

  3. #3

    Default

    Hey Marcus,

    Based off of our previous discussion I looked through the script and you're correct everything is getting wrapped into the macro button. I'm posting my updated script with the button commented out. Thanks again for the help!!
    Attached Files Attached Files

  4. #4
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    Hi,

    That looks good (though you still have the macro end bracket ']' at the very end of the zscript this won't stop the plugin loading).

    All best,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •