Hello , i would like to ask if its possible to have "Jass" functions defined in custom scripts? i got triggers like this :
But whenever i call one of those functions outside the trigger like this :
Any suggestions ? thanks in advance
-
int changes init
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


Custom script: endfunction
-


Custom script: function addblood takes integer pid, integer kolik returns nothing
-


Custom script: set udg_player_blood[pid] = udg_player_blood[pid] + kolik
-


Custom script: endfunction
-


Custom script: function lowerblood takes integer pid, integer kolik returns nothing
-


Custom script: set udg_player_blood[pid] = udg_player_blood[pid] - kolik
-


Custom script: endfunction
-


Custom script: function addhunger takes integer pid, integer kolik returns nothing
-


Custom script: set udg_hunger[pid] = udg_hunger[pid] + kolik
-


Custom script: endfunction
-


Custom script: function lowerhunger takes integer pid, integer kolik returns nothing
-


Custom script: set udg_hunger[pid] = udg_hunger[pid] - kolik
-
-
But whenever i call one of those functions outside the trigger like this :
-
Blood add
-

Events
-


Unit - A unit Uses an item
-
-

Conditions
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Item-type of (Item being manipulated)) Equal to |cff80ff80 Meat
-
-



Then - Actions
-




Custom script: call BJDebugMsg("meat")
-




Custom script: call addblood(1,2)
-
-



Else - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Item-type of (Item being manipulated)) Equal to |cff80ff80 Chips
-
-





Then - Actions
-






Custom script: call BJDebugMsg("chips")
-
-





Else - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Item-type of (Item being manipulated)) Equal to |cff80ff80 Apple
-
-







Then - Actions
-








Custom script: call BJDebugMsg("apple")
-
-







Else - Actions
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










(Item-type of (Item being manipulated)) Equal to BloodBag
-
-









Then - Actions
-










Custom script: call BJDebugMsg("bloodbag")
-
-









Else - Actions
-










If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-











If - Conditions
-












(Item-type of (Item being manipulated)) Equal to Canned fish
-
-











Then - Actions
-












Custom script: call BJDebugMsg("cANNED FISH")
-
-











Else - Actions
-












If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-













If - Conditions
-














(Item-type of (Item being manipulated)) Equal to Rasputin Beer
-
-













Then - Actions
-














Custom script: call BJDebugMsg("BEER")
-
-













Else - Actions
-














If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-















If - Conditions
-
















(Item-type of (Item being manipulated)) Equal to Baked Beans
-
-















Then - Actions
-
















Custom script: call BJDebugMsg("beans")
-
-















Else - Actions
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Any suggestions ? thanks in advance











