There are a lot of errors there
In an If-then statement, it must be 1 line:
If x=1 then blahblah
This, does not work:
If x=1 then
blahblah
If you want it more than one line, don't use 'then'.
This works:
If x=1
blahblah
Endif
(note that if you seperate the 'end' and 'if', then it won't work either)
So, these are what works:
If x=1 then blahblah
If x=1
blahblah
Endif
I also notice that you have 'end code'
That is incorrect. It should only be 'end'
Well, it should wrok if you fix everything
-Mansoor S.
(Formerly Xenocythe)