|
chris123zugg Apprentice
Joined: 23 Aug 2013 Posts: 175
|
Posted: Thu Jun 21, 2018 1:11 am
Help with array functions |
%arrget(carn1, @stepnum);stepnum = @stepnum + 1;#IF
(@stepnum > %arrhigh(carn1)) {%arrget(carn2,
@stepnum);stepnum=@stepnum +1;#IF (@stepnum >
%arrhigh(carn2)) {stop}}
it pulls from the first portion but uses stepnum's values after first portion being canceled to 0, so doesnt fire forerectly, and uses the last if's 'stop'
how do i write this to first run through the first array carn1, then when at end of array to jump to second array carn2?
thanks in advance |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4662 Location: Pensacola, FL, USA
|
Posted: Thu Jun 21, 2018 1:28 am |
Can't say i have used those functions myself, however, %functions always return a value, which you aren't saving in this example.
It looks like the value is being sent as a command to the game?
You are also never resetting @stepnum to 0
You are also not using parenthesis to incriment you variable properly:
stepNum=(@stepNum+1)
Though from what I see, you don't even need that variable, you could just as easily do:
#FORALL @cairn1 {%i}
#FORALL @cairn2 {%i} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
chris123zugg Apprentice
Joined: 23 Aug 2013 Posts: 175
|
Posted: Thu Jun 21, 2018 1:41 pm |
ok thanks shalimar.
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|