MCADAMS Posted February 25, 2012 Author Share Posted February 25, 2012 Logging into the server on any account, old or fresh, yields RTE 9\. I debugged and got this line of code:```If MapNpc(mapnum).NPC(x).SpellTimer(i) + (Spell(NPC(npcNum).Spell(i)).CastTime * 1000) < GetTickCount Then```..but I'm not sure what exactly it's depicting. Could I get some help? Link to comment Share on other sites More sharing options...
Eevee204 Posted February 25, 2012 Share Posted February 25, 2012 You should re-do the step you did before you came across this problem, usually you get an error like this when placing a NPC, object or resource. Re-do your steps will it's working again. Link to comment Share on other sites More sharing options...
MCADAMS Posted February 25, 2012 Author Share Posted February 25, 2012 Could work, unfortunately I was AFK for about 10 minutes and then I got the RTE. Link to comment Share on other sites More sharing options...
Ruins of Hell Posted February 25, 2012 Share Posted February 25, 2012 When you run the server and it crashes, mouse over each individual variable in that statement. It will tell you the value. Then see which value is wrong (that is, cannot exist). Backtrack until the place where the variable is set and fix appropriately.Hint: I guess you're using NPC Spells v.2.0.0 (since that's the only place that line appears on this forum ever and the line seems to have something to do with spells). Check that i is more than or equal to 1 and less than or equal to MAX_NPC_SPELLS. Check that npcNum and x is more than or equal to 1 and less than or equal to MAX_MAP_NPCS. Check that mapnum is more than or equal to 1 and less than or equal to MAX_MAPS. That should cover the most likely errors. Link to comment Share on other sites More sharing options...
MCADAMS Posted February 25, 2012 Author Share Posted February 25, 2012 That all seems right on my end…I could be wrong though. I probably am.``` For i = 1 To MAX_NPC_SPELLS If NPC(npcNum).Spell(i) > 0 Then If MapNpc(mapnum).NPC(x).SpellTimer(i) + (Spell(NPC(npcNum).Spell(i)).CastTime * 1000) < GetTickCount Then NpcSpellPlayer x, target, i``` Link to comment Share on other sites More sharing options...
Ruins of Hell Posted February 25, 2012 Share Posted February 25, 2012 Try and get the values of every variable by using the immediate window (run it through VB6 and at the bottom of the window there's a small window [press CTRL + G if you don't have it]). Type in ?(whatever variable). So to get the value of Spell(NPC(npcNum).Spell(i)).CastTime just do:```?(Spell(NPC(npcNum).Spell(i)).CastTime)```If it brings up the error, narrow it down (like to Spell(NPC(npcNum).spell(i)) instead) until you pinpoint the error.etc. etc.Edit: changed Debug.Print to ?, which does the same thing. 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