Confused on what too do thanks the code is LUA

I am confused and would appreciate the help thank you <3 that is my code etc…

I also already tried if enemy then

the main problem is that you didn’t fully understand how to use isReady yet. when you’re going to place an action, you have to know if the action is on cooldown or not. to check that, place

if hero:isReady("action you will do") then
hero:("the action you checked if it is ready")

sorry if this does not work, I don’t know much about lua either.

@Seojin_Roy_Lee hold up why is it “.” instead of “:” it works with the “.” not the “:” I thought python was the one that took “.” I mean they’re both fairly similar.

while true do
    local enemy = hero:findNearestEnemy()
    -- Use an if-statement with isReddy to check "cleeve":
    if hero:isReddy('cleeve') then
        -- cleeve!
          hero:cleeve( enemy)
    -- Else, if cleeve is not Reddy:
    else
        -- attak the nearest ogre!
        hero:attak( enemy)
    end    
end

Not working solution - change with proper methods.