Thread: Groovy SpecialAttacks Asteria 3.0 [SOLVED]

Results 1 to 2 of 2
  1. #1 Groovy SpecialAttacks Asteria 3.0 [SOLVED] 
    Registered Member SuperMario's Avatar
    Join Date
    May 2012
    Posts
    329
    Thanks given
    30
    Thanks received
    26
    Rep Power
    5
    No idea how to fix this..


    Code:
    DRAGON_DAGGER([1215, 1231, 5680, 5698], 25, 1.15, 1.25, CombatType.MELEE, WeaponInterface.DAGGER) {
            @Override
            CombatSessionData container(Player player, CharacterNode target) {
                player.animation(new Animation(1062, AnimationPriority.HIGH))
                player.highGraphic(new Graphic(252))
                new CombatSessionData(player, target, 2, CombatType.MELEE, true)
            }
        }
     
    SpecialAttack(int[] ids, int amount, double strength, double accuracy, CombatType combat, WeaponInterface weapon) {
            this.ids = ids
            this.amount = amount
            this.strength = strength
            this.accuracy = accuracy
            this.combat = combat
            this.weapon = weapon
        }
    Stacktrace
    Code:
    Caused by: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: plugin.specialattacks.SpecialAttack$1(java.lang.String, java.lang.Integer, java.util.ArrayList, java.lang.Integer, java.math.BigDecimal, java.math.BigDecimal, com.asteria.game.character.combat.CombatType, com.asteria.game.character.player.content.WeaponInterface)
        at groovy.lang.MetaClassImpl.selectConstructorAndTransformArguments1(MetaClassImpl.java:1611)
        at groovy.lang.MetaClassImpl.selectConstructorAndTransformArguments(MetaClassImpl.java:1530)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.selectConstructorAndTransformArguments(ScriptBytecodeAdapter.java:236)
        at plugin.specialattacks.SpecialAttack$1.$INIT(SpecialAttack.groovy)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
        at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.invoke(StaticMetaMethodSite.java:43)
        at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.callStatic(StaticMetaMethodSite.java:99)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:53)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:157)
        at plugin.specialattacks.SpecialAttack.<clinit>(SpecialAttack.groovy:23)

    EDIT:

    Fixed it by replacing int[] ids with "ids" and then use this.ids = ids as int[] in the constructor.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Stanaveli's Avatar
    Join Date
    Aug 2014
    Posts
    1,490
    Thanks given
    184
    Thanks received
    653
    Rep Power
    1338
    Get rid of groovy. For me it's one of the worst scripting languages. Most compile-time issues are displayed during run-time.
    Keep your head up.



    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [Asteria 3.0] Groovy Help
    By Julianx in forum Help
    Replies: 1
    Last Post: 07-01-2015, 09:33 PM
  2. Asteria-X Release
    By D R O in forum Downloads
    Replies: 51
    Last Post: 07-24-2012, 12:51 PM
  3. Replies: 20
    Last Post: 11-26-2011, 09:51 PM
  4. SpecialAttack Configs 525
    By Inspired Dreams in forum Snippets
    Replies: 9
    Last Post: 04-09-2009, 10:27 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •