I am trying to get this example to work. Every time the program executes a.SetAt(0,0,1) I get the error a Microsoft JScript runtime error. Description - Invalid procedure call or argument. Any suggestions.
var a = System.CreateDO("Common Data Package/Int Array Data");
a.SetDim(3);
a.SetSize(3,3,3);
a.SetAt(0,0,1);
I tried it with ts 7.6 and 7.61. It fails with jscript object and jscript command.
problems with Matrix.
-
Shell1850
- Chief Petty Officer
- Posts: 135
- Joined: 21 May 2009, 21:44
problems with Matrix.
-
froo
- Captain
- Posts: 2554
- Joined: 22 May 2009, 12:13
Re: problems with Matrix.
This problem looks familiar.
I do not remember the answer at the moment, but let me think on it,
and try some experiments.
I do not remember the answer at the moment, but let me think on it,
and try some experiments.
-
marcel
- Captain
- Posts: 2247
- Joined: 21 May 2009, 19:52
- Type the number ten into the box: 0
- Location: paris - France
Re: problems with Matrix.
If you have a problem with Matrix request to Neo. 
Design - illustration - Animation
http://www.crea-vision.fr
http://www.crea-vision.fr
-
MikomDude
- Captain
- Posts: 1930
- Joined: 04 Oct 2010, 11:12
- Type the number ten into the box: 0
- Location: The Hague, Netherlands
Re: problems with Matrix.
Good one Marcel, I was about to say the same thing. 
-
Shell1850
- Chief Petty Officer
- Posts: 135
- Joined: 21 May 2009, 21:44
Re: problems with Matrix.
Thanks froo.
i have not seen the movie.
i have not seen the movie.
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: problems with Matrix.
if I do:
var a = System.CreateDO("Common Data Package/Int Array Data");
a.SetDim(3);
a.SetSize(3,3,3);
a.SetAt(0,0,1,7);
I get no error. Note the 4th argument for the value. This was just a quick test so i don't know if it really works.
var a = System.CreateDO("Common Data Package/Int Array Data");
a.SetDim(3);
a.SetSize(3,3,3);
a.SetAt(0,0,1,7);
I get no error. Note the 4th argument for the value. This was just a quick test so i don't know if it really works.
-
Shell1850
- Chief Petty Officer
- Posts: 135
- Joined: 21 May 2009, 21:44
Re: problems with Matrix.
Thanks clintonman.
I see where I made the mistake. SetSize(3,3) makes a 3x3 Matrix. SetSize(3,3,3) makes a 3x3x3 Matrix.
I see where I made the mistake. SetSize(3,3) makes a 3x3 Matrix. SetSize(3,3,3) makes a 3x3x3 Matrix.
-
froo
- Captain
- Posts: 2554
- Joined: 22 May 2009, 12:13
Re: problems with Matrix.
I was gonna say; your original SetAt() function didn't quite look right.
But I wanted to confirm, before I said anything.
Glad you got it worked out Shell!
But I wanted to confirm, before I said anything.
Glad you got it worked out Shell!
-
froo
- Captain
- Posts: 2554
- Joined: 22 May 2009, 12:13
Re: problems with Matrix.
To confirm if this works, you should be able to then do something similar to this:clintonman wrote:if I do:
var a = System.CreateDO("Common Data Package/Int Array Data");
a.SetDim(3);
a.SetSize(3,3,3);
a.SetAt(0,0,1,7);
I get no error. Note the 4th argument for the value. This was just a quick test so i don't know if it really works.
System.Alert( a.GetAt(0,0,1);
This should display a dialog, with the text set to, the value 7
-
Shell1850
- Chief Petty Officer
- Posts: 135
- Joined: 21 May 2009, 21:44
Re: problems with Matrix.
Thanks froo.
I must have had a Homer Simpson moment this morning.
I am trying to learn Linear Algebra and integrate the homework into Truespace.
I must have had a Homer Simpson moment this morning.
I am trying to learn Linear Algebra and integrate the homework into Truespace.