PDA

View Full Version : LScript Editor help for Mac needed.



eidetiken
11-16-2006, 09:06 AM
I've been going through the LScript editor documentation and have a couple of questions.

1. The documentation constantly refers to LSED v.2.3 but the version shipped with LW9 for Mac is LSED v1.3.3. Is this a manual misprint or is the Mac version lagging behind the Windows version?

2. There are few neat tidbits in the documentation like Weld Fast, being able to weld points without popup windows is nice. But after the Weld Fast chapter, I can't seem to get any of the other sample code to work, like Changer in chapter 12; actually I can't get any of the sample code to work after the Weld Fast chapter. Is this because of the version difference stated above?

3. I'm not able to write code in another program like BBedit and copy it into LSED. The documentation says you can but apparently not in the Mac version?

Got a few other question but its frustrating to follow along with the documentation then find out the sample code you've just followed for hours doesn't work. Yes I've checked my syntax and made sure my code looks exactly like the code in the documentation, but after a week of no forward progress its time ask. Is there a bug in the Mac version of LSED or is the documentation wrong?

Dodgy
11-16-2006, 10:03 AM
The editor you make scripts in shouldn't matter. I've switched to ConText for my lscript editing needs, unfortunately there's no mac version, as it's a nice little env for writing any sort of text file (html etc) with create your own highlighters. If you're looking to script, you might want to look at my web page for plenty of examples and Lscript docs which I'm trying to get to be the most complete and up to date (when I have the time!)

Mike

eidetiken
11-16-2006, 11:04 AM
Hi Dodgy

I have a couple of your scripts, actually looked over your site when I was seaching for help, but didn't find anything that would help me learn. I'm on a Mac, all your stuff looks as if it is Windows or made on Windows comp, which doesn't help me figure out if this is a Mac specific problem. The LScripts in the NewTek LScript User Guide documentation don't even work when I write and save them in BBedit.

Maybe you can find out what's wrong with this; copied directly from the User Guide, and doesn't work.

@version 2.3
@warnings
@script replace
@name Changer


changeobj1 = "";
changeobj2 = "";
prog = "Changer v1.01";
swapframe1 = 1;
swapframe2 = 30;
create
{
setdesc(prog);
}
process: ra
{
thisframe = ra.newFrame;
switch(thisframe)
{
case swapframe1:
ra.newFilename = changeobj1;
break;
case swapframe2:
ra.newFilename = changeobj2;
break;
}
}
load: what,io
{
if(what == SCENEMODE)
{
changeobj1 = io.read();
swapframe1 = integer(io.read());
changeobj2 = io.read();
swapframe2 = integer(io.read());
}
setdesc(prog);
}
save: what,io
{
if(what == SCENEMODE)
{
io.writeln(changeobj1);
io.writeln(swapframe1);
io.writeln(changeobj2);
io.writeln(swapframe2);
}
}
options
{
reqbegin(prog);
c1 = ctlfilename("Swap Object",changeobj1,20,true);
c2 = ctlinteger("Swap Frame",swapframe1);
c3 = ctlfilename("Swap Object",changeobj2,20,true);
c4 = ctlinteger("Swap Frame",swapframe2);
return if !reqpost();
changeobj1 = getvalue(c1);
swapframe1 = getvalue(c2);
changeobj2 = getvalue(c3);
swapframe2 = getvalue(c4);
reqend();
}