Hi, I just ran into a weird error in my game, when I try to run the game I get the error, subscrit out of bounds at line 24 inside weapons.agc. I have no idea what it means nor any idea of how to fix it.
What does it mean and how can I get rid of it?
I have attatched the code where the errror appears
Weapons_Load:
Remstart
Types used:
RocketSpeccs
Arrays Used
Rocket[]
Remend
//Declaring the rockets "specs"
RocketSpecs.Damage = 10
RocketSpecs.Speed = 1
RocketSpecs.ReloadTime = 0.3
//Loading the rockets
//Loading the image
RocketSpecs.Image= LoadImage("Rocket.png")
For i=1 to Player.RocketAmount
Rocket[i] = CreateSprite(RocketSpecs.Image) ------- This is line 24 where the error says the problem is
SetSpriteShape(Rocket[i], 3)
SetSpriteScale(Rocket[i], 0.1, 0.1)
SetSpritePositionByOffset(Rocket[i], 50, 50)
Next i
Return
Weapons:
return
I think iv'e seen the error before but I can't remember what I did to fix it though...