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 / Variable inside arrays

Author
Message
Richard_6
7
Years of Service
User Offline
Joined: 3rd Feb 2017
Location:
Posted: 14th Aug 2017 03:31 Edited at: 14th Aug 2017 03:35
Hi everyone!

Suppose I have this:

a=[11,12,23]

and I want this



I'm expecting this result which means always the next position:
b=[12,23]

I know arrays can't support expressions and variables. I'm sure there's some easy way to do it, just not sure how. I appreciate your suggestions.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 14th Aug 2017 03:47 Edited at: 14th Aug 2017 03:48
Not sure if this is what you are after



haven't tested but should help
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 14th Aug 2017 03:54
you could also use the myArray.remove(0) command
fubar
Richard_6
7
Years of Service
User Offline
Joined: 3rd Feb 2017
Location:
Posted: 15th Aug 2017 02:52 Edited at: 15th Aug 2017 02:53
Thank you guys. As you mention remove I just remembered of the insert which fit the bill.

Here is the final result:

Login to post a reply

Server time is: 2024-03-29 14:30:55
Your offset time is: 2024-03-29 14:30:55