Semi-colon Error

Discussions concerning programming of SOFTIMAGE©
Post Reply
Falam

Semi-colon Error

Post by Falam » 29 May 2013, 06:17

JScript

Code: Select all

GetPrim ("null","mynull")
SetValue oCube = GetPrim ("cube","thecube","mynull")
What am I missing why I keep getting a semi-colon error, I must have placed a semi-colon in every place possible,yet the error continues ?

Ahmidou
Posts: 106
Joined: 04 Jan 2010, 14:00

Re: Semi-colon Error

Post by Ahmidou » 29 May 2013, 08:40


User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: Semi-colon Error

Post by Daniel Brassard » 29 May 2013, 14:03

GetPrim ("null","mynull")
SetValue oCube = GetPrim ("cube","thecube","mynull")
In JScript, you must terminate each lines with a semi-column, except the comment lines like so

Code: Select all

//Jscript code
GetPrim ("null","mynull");
SetValue oCube = GetPrim ("cube","thecube","mynull");
Watch your variable declarations as well as per Ahmidou earlier e-mail as well i.e

var oNull = GetPrim("Null", "myNull" ....

Dan
$ifndef "Softimage"
set "Softimage" "true"
$endif

Falam

Re: Semi-colon Error

Post by Falam » 29 May 2013, 15:46

It still fires a semi-colon error :( As I mentioned I put a semi-colon in so many areas in the code, the script won't work, so with that into consideration, if it's not the semi-colon, they it has to be the variable, there appears to be nothing wrong with the code, I'll look it over again.

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 01:41
Contact:

Re: Semi-colon Error

Post by EricTRocks » 29 May 2013, 16:35

Falam, post your updated code that is failing with the semi-colons you added please so that others can assist you better.

Moderator edit: real name replaced by alias as per Falam's request - HB
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

face
Posts: 57
Joined: 10 Jan 2010, 12:28

Re: Semi-colon Error

Post by face » 29 May 2013, 20:33

I think you mean:

Code: Select all

JS:
GetPrim ("null","mynull");
oCube = GetPrim ("cube","thecube","mynull");

VBS:
GetPrim "null","mynull"
Set oCube = GetPrim ("cube","thecube","mynull")
SetValue() is a Softimage command, not a javascript command like set in VBS.

face

Falam

Re: Semi-colon Error

Post by Falam » 29 May 2013, 20:46

face wrote:I think you mean:

Code: Select all

JS:
GetPrim ("null","mynull");
oCube = GetPrim ("cube","thecube","mynull");

VBS:
GetPrim "null","mynull"
Set oCube = GetPrim ("cube","thecube","mynull")
SetValue() is a Softimage command, not a javascript command like set in VBS.

face
Thank You, works :)

Falam

Loop Problem A

Post by Falam » 09 Jun 2013, 19:53

JScript

Code: Select all

for (var p = 1; p<=3; p++){
oNull = GetPrim ("Null", "mynull0")
i = 3.4
oNull.size = 3.0
}
SetValue (oNull&&".kine.local.posy",2)

How come the last null in the loop is the only one that has a value of two units moved in Y, shouldn't the other have the same ? I know the nulls are not physically moved, although there translation should reflect (2) ?

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 01:41
Contact:

Re: Semi-colon Error

Post by EricTRocks » 09 Jun 2013, 19:59

Your set value is outside the loop.
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

Falam

Re: Semi-colon Error

Post by Falam » 09 Jun 2013, 20:06

EricTRocks wrote:Your set value is outside the loop.
Thanks !

Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests