Hello Ventuzians!
THE FORUMS ARE CLOSED!

Please join our discord server HERE!! << click me :D

We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server

Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!

I can't set an Array inputs of script

Please report bugs in this group. We will maybe populate a list of known bugs with a possibly modified description at a later time.

Moderator: Support

Post Reply
allen hyoga

I can't set an Array inputs of script

Post by allen hyoga » 27 Mar 2013, 07:17

I create a string array for a script input and I set a value to the variable, which cause a syntax error.
For example, the input variable is called "Name",I initialize like

Code: Select all

Name = new string[2] {"A","B"};
which complied well.But when I operate the array variable,just like

Code: Select all

int len = Name.Length;
string name = Name[0];
it will pop syntax error that said a get method is lacked.
However I define a string array in script, it works well.

Code: Select all

string[] NameArray = new string[2]{"A"."B"};
int len = NameArray.Length;
string name = NameArray[0];
is it a bug ?

User avatar
Robert
Posts: 318
Joined: 21 Jan 2012, 09:25
Location: Toulouse - France
Contact:

Re: I can't set an Array inputs of script

Post by Robert » 31 Mar 2013, 12:27

Hi,

Are you trying to change script input value inside your script ?
I'm not sure but it seems that scripts inputs values can only be changed accessing the script node input property.
When you create an input value in a script it is initialized with the value the input property is connected to.

Robert

allen hyoga

Re: I can't set an Array inputs of script

Post by allen hyoga » 01 Apr 2013, 04:56

I'm sorry, I meant the script output, not the input. :P

so is it a bug ?

MartinT

Re: I can't set an Array inputs of script

Post by MartinT » 17 Apr 2013, 15:24

Hi,
its not a bug.
Due to binding restrictions there's no read/write access to single elements of an output array.
Simply work with a local array and assign it to the output array when needed.

Best regards
Martin

Post Reply