Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey all, I've taken a C++ programming class and loved it, so I thought about taking a shot at Maxscript, and wow is it hard.
My problem is this:
I simply want to mix a string and an integer and somehow turn them both into a string, so I can use that output string as an object's name. (Which is also broken as well.) Here's the code:
try (closeRolloutFloater RolloutFloaterTemplate) catch() rollout RolloutTemplate "Test" -- Rollout title label ( edittext base_name spinner objnum "Number of objects" range:[10,100,10] type:#integer -- spinner stuff button button1 "Create" -- button stuff on button1 pressed do -- when button's pressed for i=1 to i=objnum.value do -- do this as many times as the spinner specifies ( if base_name.text != "" do -- if the input text box isn't empty... do the bottom ( position = i*10 -- variable position tracks the loop number box pos:[position,0,0]-- every newly spawned box is moved over slightly base_name i as string = name -- *broken* input text and string become new object's name print name -- prints the new name in the listener ) -- ends loop for checking if the text box isn't empty ) ) RolloutFloaterTemplate = newrolloutfloater "First window" 250 125 -- window dimensions addrollout RolloutTemplate RolloutFloaterTemplate -- rollout stuff
Can anyone tell me why it refuses to allow me to turn the integer into a string, letalone, allow the object to be renamed to what I'm trying to do?
By the way, I went around looking for the answer, and either I am totally sucking at this Maxscript language, or I overlooked something... 😕
Need help? Need to contact Autodesk? Click on the link below!
https://knowledge.autodesk.com/contact-support/technical-support
Solved! Go to Solution.