Help with if/elseif

Hey guys apparently this code does not work…

function workoutPrep(event) if numCurrent == 1 then activityCurrent = myTable:ex1 elseif numCurrent == 2 then activityCurrent = myTable:ex2 elseif numCurrent == 3 then activityCurrent = myTable:ex3 elseif numCurrent == 4 then activityCurrent = myTable:ex4 elseif numCurrent == 5 then activityCurrent = myTable:ex5 elseif numCurrent == 6 then activityCurrent = myTable:ex6 end end

The error I am getting is- 

TimedActivities/main.lua

Line: 45

Function arguments expected near ‘elseif’

Any help is appreciated! Thanks!

Should be myTable.ex1, myTable.ex2, etc

Thanks a ton! Now fixed :slight_smile:

Should be myTable.ex1, myTable.ex2, etc

Thanks a ton! Now fixed :slight_smile: