InitTrig problem

Gladius_Tito

New Member
Reaction score
0
I'm trying to make a map using a few systems. When I save, though, it says Trigger X missing Function InitTrig_X.

I'm hardly any good at JASS, so, can anyone help?
 

Rainther

I guess I should write something of value here...
Reaction score
61
If you got vJass, wrap the trigger intro a scope.

JASS:
scope Stuff initializer Init
//Your stuff
//Name the function startening the trigger Init
endscope


If you got regular Jass just name the function with trigger, events, etc. the same as the Trigger's named. With "init" before.
 

Gladius_Tito

New Member
Reaction score
0
Uh...

I think I'll just post a sample trigger problem.

This is from Steel's RPG Framework, under Experience System.

JASS:
//TESH.scrollpos=25
//TESH.alwaysfold=0
library Experience initializer Init
globals
private trigger experience
private boolean enable = true   //If this is true, this will enable the system.  This will assume you have any and all forms of in game mechanics of experience disabled
private boolean fancy  = true   //If this is true, this will created a fancy multiboard using the MultiBars system by Ammorth
                                //If this is false, this will create a standard multiboard with a simple text display  
                
private boolean share = true    //If true, shares experience with units around killer. If false, only killing unit gets experience.

private boolean split = true   //If true, divides the experience gained to surrounding units. If false, all units receive the same fixed value
                                //Assume this is true: Example, if unit yields 100 experience and there are 4 units, each unit receives 25 experience
                                //If this were false, each unit would receive 100 experience
                                
private real range = 250.       //The range on experience yield if shared


endglobals

public function Enabled takes nothing returns boolean
return enable
endfunction

public function Fancy takes nothing returns boolean
return fancy
endfunction

public function Share takes nothing returns boolean
return share
endfunction

public function Split takes nothing returns boolean
return split and share //Split true..share false...returns false. Split ok, share false so its only for one unit
endfunction

public function Range takes nothing returns real
return range
endfunction

public function Trigger takes nothing returns trigger
return experience
endfunction

private function Init takes nothing returns nothing
set experience = CreateTrigger()
endfunction

public function Setup takes boolean enable_system, boolean fancy_display, boolean share_exp, boolean split_exp, real max_range returns nothing
set enable = enable_system
set fancy = fancy_display
set share = share_exp
set split = split_exp
set range = max_range
endfunction


endlibrary
 

Romek

Super Moderator
Reaction score
964
Is Jasshelper enabled?
Are you using newgen?
Are you using the latest newgen?
 

T.s.e

Wish I was old and a little sentimental
Reaction score
133
You press this button:
attachment.php

It's under the JassHelper field in your NewGen editor.
 

Attachments

  • JassHelperImage.jpg
    JassHelperImage.jpg
    8.9 KB · Views: 173
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top