Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / hhow to mix data in arrays ?

Author
Message
Captain Ouais
20
Years of Service
User Offline
Joined: 12th Dec 2003
Location: France
Posted: 21st Sep 2015 18:47
Hello !!

I use an array to store data.I'd like to mix

how to do ?

Thank you !

I do what i do !!!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 21st Sep 2015 19:22


Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Captain Ouais
20
Years of Service
User Offline
Joined: 12th Dec 2003
Location: France
Posted: 21st Sep 2015 20:43 Edited at: 21st Sep 2015 20:46
Thx but how can mix ?



I do what i do !!!
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 21st Sep 2015 21:28 Edited at: 21st Sep 2015 21:30
just pick two indexes with random and swap values / the type data.

temp=a
a=b
b=temp

or give it a random order by value / field and sort the array then.

AGK (Steam) V2 Beta .. : Windows 10 Pro 64 Bit : AMD (15.7.1) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)

Login to post a reply

Server time is: 2024-11-25 18:02:24
Your offset time is: 2024-11-25 18:02:24