Announcement

Collapse
No announcement yet.

Maxscript help MKIII

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Maxscript help MKIII

    What's all this then. It's only a selected part of the code but is all in context. There is a global "global VRCUDesc".

    -- Error occurred in anonymous codeblock; filename: CKD-VRCacheUtils.mcr; position: 1223; line: 49
    -- Syntax error: at keyword parameter, expected name
    -- In line: label VRCUDescLabel VRCUDesc pos:[


    line 49 = label VRCUDescLabel VRCUDesc pos:[0,0]

    Code:
    		dropdownlist VRCUDDown "" items:#(
    															"Save+Load",
    															"Compute+Load",
    															"Load Existing",
    															"Unload"
    															)
    															width:200 align:#center
    
    		on VRCUDDown selected sel do
    		(
    			if sel == 1 then
    			(
    				VRCUDesc = "Saves the current in-memory cache and loads it (sets mode to File)."
    			)
    			
    			if sel == 2 then
    			(
    				VRCUDesc = "Turns off render final image, turns on show gi only, changes mode to Single, auto-save and auto-switch!"
    			)
    			
    			if sel == 3 then
    			(
    				VRCUDesc = "Loads existing caches."
    			)
    			
    			if sel == 4 then
    			(
    				VRCUDesc = "Goes back to Single mode, turns off auto-save and switch."
    			)
    		)
    																													
    		groupBox VRCUDescGrp "" pos:[5,30] width:200 height:60 
    		
    		label VRCUDescLabel VRCUDesc pos:[0,0]

  • #2
    I'd say that the text of the label "VRCUDescLabel" can't be initialized with a variable (VRCUDesc) like this.

    Try to replace the code with this:
    Code:
    dropdownlist VRCUDDown "" items:#(
                                                                "Save+Load",
                                                                "Compute+Load",
                                                                "Load Existing",
                                                                "Unload"
                                                                )
                                                                width:200 align:#center
    
    
                                                                                                                        
            groupBox VRCUDescGrp "" pos:[5,30] width:200 height:60 
            
            label VRCUDescLabel "Saves the current in-memory cache and loads it (sets mode to File)." pos:[0,0] -- Label Text = Default option text
                                                                
            on VRCUDDown selected sel do
            (
                if sel == 1 then
                (
                    VRCUDescLabel.text = "Saves the current in-memory cache and loads it (sets mode to File)."
                )
                
                if sel == 2 then
                (
                    VRCUDescLabel.text = "Turns off render final image, turns on show gi only, changes mode to Single, auto-save and auto-switch!"
                )
                
                if sel == 3 then
                (
                    VRCUDescLabel.text = "Loads existing caches."
                )
                
                if sel == 4 then
                (
                    VRCUDescLabel.text = "Goes back to Single mode, turns off auto-save and switch."
                )
            )

    Comment

    Working...
    X