HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Exceeded $callStackLimit (99) - Adding/removing an ability  (Read 655 times)

cloudnine

  • General Accounts
  • *
  • Posts: 80
    • View Profile
    • Youtube

I'm trying to make a gui to add and remove abilities for a character
I can add an ability, but trying to remove
I get Exceeded $callStackLimit (99)
Edit: works now i had to comment out
 loop i from 1 to me.AbilityList.length
      //if me.AbilityList = rability
        remove me.AbilityList at i
        println("Abilitylistlength is now(" +me.AbilityList.length+")(" +rability+")" )
        break
      //.
So I have functions in a server class SoloTraining
Which eventually go to a method in Abilities class
Code: [Select]
[hsl_debug] 9223372063121132752,4: SCRIPT[SoloTrainingClassMethods]: The Character Already Has this ability time to remove it
[hsl_debug] 9223372063121132752,4: SCRIPT[AbilitiesClassMethods]: RemoveAnAbilityFromList ok
[hsl_debug] 9223372063121132752,4: SCRIPT[AbilitiesClassMethods]: 9223372063269132768THISISTHEABILITY
[hsl_debug] 9223372063121132752,4: SCRIPT[AbilitiesClassMethods]: Abilitylistlength is (2)(9223372063269132768)
[hsl_error] 9223372063121132752,4: [Summerfell_01] SCRIPT ERROR: Exceeded $callStackLimit (99)
01/07/2013 11:14:43 UTC
Call trace:
  Script ObsListenerClassMethods line 16 me[id=9223372063305133131 class=collectionIterator]
  Script ObsSubjectClassMethods line 28 me[id=9223372062222132879 class=Abilities]
  Script CollectionClassMethods line 401 me[9223372062222132879]
  Script AbilityBarSettings line 153 me[9223372062222132879]
  Script AbilityBarSettings line 33 me[9223372062222132879]
  Script AbilityBarSettings line 138 me[9223372062222132879]
  Script AbilityBarSettings line 164 me[9223372062222132879]
  Script AbilityBarSettings line 33 me[9223372062222132879]
  Script AbilityBarSettings line 138 me[9223372062222132879]
  Script AbilityBarSettings line 164 me[9223372062222132879]
  Script AbilityBarSettings line 33 me[9223372062222132879]
  Script AbilityBarSettings line 138 me[9223372062222132879]
  Script AbilityBarSettings line 164 me[9223372062222132879]
  ...
  Script AbilityBarSettings line 171 me[9223372062222132879]
  Script AbilitiesClassMethods line 74 me[9223372062222132879]
  Script AbilitiesClassMethods line 113 me[9223372062222132879]
  Script SoloTrainingClassMethods line 275 me[0]
  Script SoloTrainingClassMethods line 164 me[0]
  Script SoloTrainingClassMethods line 112 me[0]
  Script SoloTrainingClassMethods line 24 me[0]
starting method/function REQUESTREMOVEJOBSKILL
starting me[id=0 invalid]

remote call from originating script SoloTrainingWindowClassMethods function RequestRemoveJobSkill node 1000003489 client 9223372055763132658
The methods to remove the ability in Abilities class
Code: [Select]
method RemoveAnAbilityFromList(char as NodeRef,myskill as ID)
  println("RemoveAnAbilityFromList ok")
//  SYSTEM.EXEC.CPULIMIT = 00:00:30
//  account as NodeRef = SYSTEM.REMOTE.CLIENT
//  var char = account.GetMyChar()
//  var charAbilities = char.GetMyAbilities()
 
  //var abList = me.AbilitiesQuicklookup
  //foreach key in abList
//    if key = myskill
    var ability = me.AbilitiesQuicklookup[myskill]
    println( ability +"THISISTHEABILITY")
    me.RemoveAbilityFromList( ability )
//  .
//.

.
Code: [Select]
method RemoveAbilityFromList(rability as NodeRef of Class E_Ability)
  if rability = None
    return
  .
  key as ID = rability.SpecKey
  char as NodeRef = me.GetMyAbilitiesPossessor()
  if char is kindof _PlayerCharacter
    println("Abilitylistlength is (" +me.AbilityList.length+")(" +rability+")" )
    loop i from 1 to me.AbilityList.length
      if me.AbilityList[i] = rability
        remove me.AbilityList at i
        break
      .
    .
    AbilityBarSettings:removeSlotForSpec(char, ABILITY, key)
    AbilityBarSettings:SendAbilityBarSettingsToClient(char)
    account as NodeRef of Class E_playerAccount = char.GetMyAccount() 
    if me.HasAbility(key)
      me.RemoveCollectionElement( rability, destroy )
    .       
    me.TransmitRemoveCollectionElementToClient( account, rability, destroy )
  . 
  me.UnReplicateAbility(rability)
  me.UpdateAbilitiesQuickLookup()
  if rability != None
    DestroyNode(rability)
  .
.
« Last Edit: Jan 07, 13, 11:49:32 AM by cloudnine »
Logged