Syntax Error
Hello I Keep getting a syntax error and i cant find the reason why? I know its probaly something really simple so though it might be good to get a diffrent set of eyes on it.. Thanks
h = eulerangles 180 0 0
button animateobject "Animate Object"
on animateobject pressed do
(
for i=1 to 60 by 10 do
(
at time i with animate on
(
rotate $ h
)
)
)
local usersimage
button btn_browse "Select Texture" align:#left
button btn_aplyMat "Apply Material" align:#left
on btn_browse pressed do
(
usersimage = getOpenFileName caption: "Select Your Image" filename:maxFilepath types: "Images (*.bmp;)|*.bmp"
)
on btn_aplyMat pressed do
if selection.count == 0 then messageBox "Select some objects!" else
(
selection[1].material = standardMaterial diffuseMap: (Bitmaptexture fileName:usersimage) showInViewport:true
)
button exportobjects "Export Selected Objects"
on exportobjects pressed do
if selection.count == 0 then messageBox "Select objects!" else
(
local exportpath = @"C:"
exportFile exportpath using:ObjExp selectedonly:on
)
button closeinterface "Exit"
on closeinterface pressed do
(
destroydialog test_button
)
)
createDialog test_button 500 600
Comments
...
Folow this style when you start to write your tools for avoid common errors. Your style I not understand.
bga
Ive just edited all my code
Ive just edited all my code so it follows your format and it works perfectly now..
Thanks Alot
My code is obviously a
My code is obviously a mess!
When i put your code in i still get a syntax error occuring on:
on btn_browse pressed do
It comes up with:
-- Syntax error: at on, expected while
-- In line: on b