![]() |
Move to next item in array
Probably a really simple answer that I'm over looking, but if you have an array
dumbarray = {1,2,3,4,5} and you set it to 1 onCreated(), what would you move to move it to 2? Im using it with a time script to do days, and I prefer to do it this way since i have hours resetting at 24. Was simply going to tell the serverr.var to move when it resets. |
Quote:
If that's the case I suppose you just increment the index variable? Maybe you should post some code and show what you're actually doing? |
I don't understand your question but maybe this will help.
PHP Code:
|
PHP Code:
PHP Code:
Just want the array to move to the next one, even if ithe next one is [0] even if coming from [6]. |
PHP Code:
|
One-liner and without extra variables:
PHP Code:
|
Quote:
Quote:
|
Quote:
Quote:
|
Quote:
Quote:
|
Just store day as a 0 to 6 value, and have your script convert that to a day (Monday, etc.) on the client.
Scripted Time in it's simplest form: PHP Code:
PHP Code:
|
Why don't you base it on timevar2?
http://forums.graalonline.com/forums...hp?t=134258550 Or if you want the serverlister time (time on the Graal taskbar) HTML Code:
Serverlist_TaskBar_Label.text |
Quote:
|
| All times are GMT +2. The time now is 01:17 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.