Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (Grant), 999 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
array in array answered #337611
08/12/10 01:09
08/12/10 01:09
Joined: Apr 2006
Posts: 159
Latvija
Arrovs Offline OP
Member
Arrovs  Offline OP
Member

Joined: Apr 2006
Posts: 159
Latvija
im confused something dont work exatcly how it should work.

var m_temp;
var m1[12];
var m2[12];
var m3[12];
var m4[12];
var m[4];

function main()
{
//for example i have already filled m1-m4 with values
m[0]=m1;
m[1]=m2;
m[2]=m3;
m[3]=m4;

m_temp=m[1];//strangely i got only first m2 value not them all
//possibly you can advice me
}
//So i wished to ask, if is possible to in array put arrays

Here is one way - good way.

Last edited by Arrovs; 08/12/10 12:48.

Arrovs once will publish game
Re: array in array [Re: Arrovs] #337617
08/12/10 06:26
08/12/10 06:26
Joined: Dec 2008
Posts: 271
Saturnus Offline
Member
Saturnus  Offline
Member

Joined: Dec 2008
Posts: 271
You can't do that in C-Script. You have to do it like it's described in the manual:
Quote:
Multidimensional arrays can be defined by multiplying the index by the array width. Suppose you need an array in two dimensions, like a 10*20 grid of height values. It is defined this way:
var heightmap[200]; // 200 = 10*20

The array value at position (j,i) can then be accessed through:
heightmap[j*20 + i] = 10; // j = 0..9, i = 0..19

http://www.conitec.net/beta/aarray.htm


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1