PDA

View Full Version : Layout Problem



fbitonti
02-28-2004, 09:44 PM
I am a student struggeling to teach myself Lscript. it has been a battel due to the limited documentation that is availabe. However, i feel that I am doing well but I have hit a snag. I am trying to write a Lscrip that accepts a number of values from an interface with a series of popup menus. it then ads up these values and executes a series of actions. However, wheneever i run the bellow script i don't get the interface to popup. and noting changes in the scean. Obviously their is somthing wrong with my script but I can't find a error because of the limited documention that i have. Can some one please help it would be greatly appreciated.

bellow is the script i am working with.


@version 2.3

@define aa 10
@define bb 30
@define 1a 30
@define 1b 40
@define 1 1
@define 2 1
@define 3 1

options
{
var1 = 1;
var2 = 1;
var3 = 1;

reqbegin("My Requester");
reqsize(500,170);

c1 = ctlpopup("var1",var1,@"aa","bb"@);
ctlposition(c1,227,41);


c2 = ctlpopup("var2",var2,@"1a","1b"@);
ctlposition(c3,227,70);

c3 = ctlpopup("var3",var3,@"1","2","3"@);
ctlposition(c4,228,97);

return if !reqpost();

film = getvalue(c1);
location = getvalue(c2);
type = getvalue(c3);

reqend();

if (var1 + var2 + var3 == 41) {
AddPointLight("1");

}

if (var1 + var2 + var3 == 42) {
AddPointLight("2");
}

if (var1 + var2 + var3 == 43) {
AddPointLight("3");
}

if (var1 + var2 + var3 == 44) {
AddPointLight("4");
}

if (var1 + var2 + var3 == 45) {
AddPointLight("5");
}
}

thanks again for the help. I realy appreciate it.

GregMalick
03-09-2004, 01:51 AM
I'm guessing that this is really a joke because this LScript won't even pass syntax checking. No way it's gonna run.
But in the slim chance you are just a totally lost newbee....
Why are you defining these literals:

@define 1 1
@define 2 1
@define 3 1

These aren't variables, but preprocessor literals. It's a little like remapping your keyboard so 1 will type 1 AND 2 will type 1 AND 3 will type 1.

Not only are these messing you up royal, but are inherently confusing.

- nuff said