PDA

View Full Version : Lscript problem


fbitonti
02-24-2004, 05:32 PM
I am a student trying to teach myself how to program in Lscript. I am currently trying to create a script that performs a bevels on a selected polygon so that i can streamline the work flow on a particular project that i am working on. However, I having trouble with the syntax. Bellow is the code that I created if someone could help me it would be great. I realy want to learn Lscript but am finding it difficult to find info.


//-----------------------------------------
// LScript Modeler template
//

@version 2.2
@warnings
@script modeler

// global values go here

main
{
main
{

selmode(USER);

editbegin();
(Polys) = polycount();
if(Polys > 1) error("Please pick 1 polygon");


reqend();

status bevel(0mm, 1mm);

}

if some one could point out the syntax errors it would be great. Thanks for the help.

:beer:

gga
02-26-2004, 10:08 AM
fbitonti, you should try the newtek forums, as you will likely find more people with experience there.

You may also want to start out from another bevel script, such as:

http://www.balo.com/lightwave/multibevel.html


I'll try to help you but it's been ages since I touched lscript, so my memory of it all is quite foggy...

Originally posted by fbitonti


// global values go here

main
{
main
{



This is wrong. You should not need two main functions. Only one should be enough.


selmode(USER);

editbegin();
(Polys) = polycount();
[/B]

You don't need the () in Polys.



reqend();
[/B]

reqend() ends a requester, but you have not opened any.
You likely mean editend().


status bevel(0mm, 1mm);

[/B]

Take out the status thingy there.

CGTalk Moderation
01-17-2006, 12:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.