PDA

View Full Version : Array expression element must be a scalar value???


PlebianX
06-01-2003, 05:54 PM
Gosh, I'm just full of questions! :D Hehhehehe... But that's what the forums are for, right?! So here goes:

My script gives this snippet of code:

// Error: disconnectAttr ("BendGroup.Bend") ($c + ".curvature");
//
// Error: An array expression element must be a scalar value. //
// Error: }; //
// Error: Syntax error //

So what's and array expression element? I've tried everything here, including putting my two attributes into strings and so forth, so what's causing the fuss?

to give more context it's from the following code, where i'm checking if the selection is in a particular group and in that case deleting the connection.

string $te[] = `listConnections $c`;
if($te[0]=="BendGroup") then
{
disconnectAttr ("BendGroup.Bend") ($c + ".curvature");
}

ajk48n
06-01-2003, 09:02 PM
Try getting rid of "then" in your if statement.

PlebianX
06-01-2003, 09:59 PM
Thank you!:bounce:
Found another problem as cosequence, but at least the STRUCTURES right. :)
That's the problem with know BASIC, C, C++, Visual Basic, Director, Bla bla bla bla bla..... It becomes a random mess after a while.

//PlebianX

CGTalk Moderation
01-15-2006, 07:00 AM
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.