• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[JASS] Why won't this pass the syntax check?

Status
Not open for further replies.
Level 7
Joined
Oct 8, 2008
Messages
200
Am still learning jass but am working on a spell that uses 3 different effects.
It says the error at the part where I call the function
JASS:
function Effect1 takes nothing returns nothing
endfunction
function  Effect2 takes nothing returns nothing
endfunction
function  Effect3 takes nothing returns nothing
endfunction

function Spell_Actions takes nothing returns nothing
local integer level
local unit target
local integer effectselected
set effectselected = 1
    
    if effectselected == 0 then
    call  Effect1
    else
        if effectselected == 1 then   
        call   Effect2
        
        else
            if effectselected == 2 then
            call  Effect3
            else
        endif
    endif
endfunction
Am still working on it but I can't figure out why whats wrong with this small part
 
Status
Not open for further replies.
Top