• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Constructor requires no arguments

Status
Not open for further replies.
Level 16
Joined
May 1, 2008
Messages
1,605
Yes, about this error massage I have a question. This error massage comes up in this part of my spell:
JASS:
   private function ESCast takes nothing returns boolean
        if GetSpellAbilityId() == SPELL_ID then
            call ElementalSpin.create(GetTriggerUnit())
        endif
        return false
    endfunction
The error comes up, if I add "GetTriggerUnit()"


Now I learned it like this, that this function gives one or more arguments to the create method and my create native is this:
JASS:
static method ESCreate takes unit caster returns thistype

Now, if I delete "GetTriggerUnit()", the error is gone, but I still need this argument, to give it to the create method or not? =O Because when I cast nothing happen, I search for mistakes now (because JassHelper say everything is fine and I was wondering first about this part)
[It's my first time with "thistype", else it returns the name of the spell and then I don't get any error.
Hope someone can help with this

Greetings and Peace
Dr. Boom
 
The constructor method requires to have an identifier called create, if you still insist on using Escreate then use ElementalSpin.EScreate(GetTriggerUnit()) as the default constructor for your struct.
 
The constructor method requires to have an identifier called create, if you still insist on using Escreate then use ElementalSpin.EScreate(GetTriggerUnit()) as the default constructor for your struct.

vJass is crazy, I always use only .create even if create method has a different name. My spell doesn't work anyway - but this problem is solved xD

Thanks dude
Dr. Boom
 
Status
Not open for further replies.
Back
Top