Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Linear spells


Zopto
 Share

Recommended Posts

C**all FireProjectile(i, GetPlayerDir(i), Spell(Player(i).Spell(TempPlayer(i).spellBuffer.Spell)).Vital, Spell(Player(i).Spell(TempPlayer(i).spellBuffer.Spell)).Range, TempPlayer(i).spellBuffer.Spell)**
                                TempPlayer(i).spellBuffer.Spell = 0
                                TempPlayer(i).spellBuffer.Timer = 0
                                TempPlayer(i).spellBuffer.target = 0
                                TempPlayer(i).spellBuffer.tType = 0
                                End If
i geting error when i cast spell
Link to comment
Share on other sites

what error?

also i recommend you simplify your code to ease in debugging this problem.

ie
dim playerDir as long
dim tempSpell as long
dim vitalmod as long
dim spellRange as long

playerDir = GetPlayerDir(i)
tempSpell = TempPlayer(i).spellBuffer.Spell
vitalMod = Spell(Player(i).Spell(tempSpell)).Vital
spellRange = Spell(Player(i).Spell(tempSpell).Range

Call FireProjectile(i, playerDir, vitalMod, spellRange, tempSpell)
Link to comment
Share on other sites

Well since its a rte 9(subscript out of range) this means you are trying to access a part of an array that does not exist.

So if you don't know what an array is, it is a group of variables inside 1 variable to put it simply.

So instead of doing something like,:

```
Dim Variable1 As Integer
Dim Variable2 As Integer
Dim Variable3 As Integer

```
We can do it like this, since there all the same type we can just bunch them into 1 group.

```
Dim Variable(1 to 3) As Integer

```
So now your error comes into place when we are trying to read from this array, there is only 3 variables stored in this array Variable(1), Variable(2), Variable(3) as we specified (the 1 to 3 ) this error comes up if your trying to access any number above 3 or below 1(changed with the array size).  So you need to find which of those 3 arrays Baron kinda cleaned up for you is causing the error first.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...