Zopto Posted April 4, 2012 Author Share Posted April 4, 2012 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 Ifi geting error when i cast spell Link to comment Share on other sites More sharing options...
Baron Posted April 4, 2012 Share Posted April 4, 2012 what error?also i recommend you simplify your code to ease in debugging this problem.iedim playerDir as longdim tempSpell as longdim vitalmod as longdim spellRange as longplayerDir = GetPlayerDir(i)tempSpell = TempPlayer(i).spellBuffer.SpellvitalMod = Spell(Player(i).Spell(tempSpell)).VitalspellRange = Spell(Player(i).Spell(tempSpell).RangeCall FireProjectile(i, playerDir, vitalMod, spellRange, tempSpell) Link to comment Share on other sites More sharing options...
Zopto Posted April 4, 2012 Author Share Posted April 4, 2012 run time error 9 and when i press button debug it show that call….in server side Link to comment Share on other sites More sharing options...
Scott Posted April 4, 2012 Share Posted April 4, 2012 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 IntegerDim Variable2 As IntegerDim 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 More sharing options...
Zopto Posted April 4, 2012 Author Share Posted April 4, 2012 so i need just to put baron code?xD i still lerning Link to comment Share on other sites More sharing options...
Scott Posted April 4, 2012 Share Posted April 4, 2012 No you need to find what array in that line is causing the rte, all baron did was clean it up to make it easy to read it fixed nothing. Link to comment Share on other sites More sharing options...
crzyone9584 Posted April 4, 2012 Share Posted April 4, 2012 What sub is this out of. Are you sure that i is defined? or should you be using index or attacker? Link to comment Share on other sites More sharing options...
Soltira Posted April 5, 2012 Share Posted April 5, 2012 I be Normality… I am TOTALLY gonna play your game when I get home! x_x Link to comment Share on other sites More sharing options...
Zopto Posted April 5, 2012 Author Share Posted April 5, 2012 @Soltira:> I be Normality… I am TOTALLY gonna play your game when I get home! x_xwhat you talking about?? Link to comment Share on other sites More sharing options...
SkywardRiver Posted April 5, 2012 Share Posted April 5, 2012 ignore him Zopto, Hey Soltira! I'm pretty sure there's a rule saying, if you don't know the answer to the question, don't post at all. Not angry, just letting ya know, Jaxx Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now