Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Array
#1
Can someone help me, whats an array?

I've tried to rip over Arrows but when I click Run, it highlights 'Map' and says Expected Array...

If x >= 0 And x = 0 And y
Reply
#2
Take this for example:

Code:
Dim i(1 to 3) As Integer

i(1) = 100
i(2) = 50
i(3) = 25

Code:
Dim i1 as integer
dim i2 as integer
dim i3 as integer

i1 = 100
i2 = 50
i3 = 25

Exact same code. Except for with arrays, you can perform bulk operations.

Code:
dim i(1 to 10000) as long
dim j as long

For j = lbound(i) to ubound(i)
   i(j) = j \ i + i
next j

Now try doing THAT without arrays. :lol:
Reply
#3
alright thankyou, i'll try and fix my bug Smile
Reply
#4
If you're trying to rip the ranged weapons system from ES, you truly are an idiot. There is a tut floating around for this, by me, using the ES system. If it's not on the forums, it IS on Robin's and Cruel's back up of them. So ask them.
Reply
#5
:x, well can u link me? :p
Reply
#6
Try searching the forums, they're around someone. I don't have much time to look myself right now, I'm at work Big Grin
Reply
#7
If you're on the client, Map isn't an array :lol:
Reply
#8
It is in Elysium though, I think.
Reply
#9
Sonire Wrote:It is in Elysium though, I think.

Exactly, which is why he's getting this error. On Elysium, Map is an Array, but not on Mirage Source, thus the error :wink:
Reply
#10
;( oh well, deleted the whole thing from the source... But i searched forums and couldnt find any arrow/bow tuts :\
Reply
#11
Don't look for the tut, look for the Tutorial Database hosted by Robin and Cruel
Reply
#12
oh hmm k
Reply
#13
Da Undead Wrote:oh hmm k

You know, you could've just changed the line to :

Code:
If Map.Tile(x, y).Type = TILE_TYPE_BLOCKED Then
Reply
#14
gah tolate >.> xD
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)