can`t figure out what`s wrong in definitions

Asked by Sart Sart

could anyone help me finding what`s wrong in these definitions? everytime i start the script, it says:
[error] script [ Nowy folder (3) ] stopped with error in line 8 at column 14
[error] SyntaxError ( "no viable alternative at input ')'", )

code:
def levelup():
    if ok.exists("1395251329190-2.png"):
        click("1395251329190-2.png")
    else:
        pass
def combat():
    while exists(Pattern("1395591427929.png").similar(0.63)):
        type(-)
        click(Pattern("1395591427929.png").similar(0.63))
        type(-)
        click(Pattern("1395591427929.png").similar(0.63))
        type(o)
        continue
    else:
        click("1395593583567.png")
        pass
def fight():
    if exists(Pattern("1395592680025.png").similar(0.64)):
        type(o)
        wait(4)
        combat()
    else:
        pass

@edit1
even when i delete the wrong line, the error stays there

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

What you type() must be a string:
type("-")

a string is text enclosed in apostrophs.

Revision history for this message
Sart Sart (michal10511) said :
#2

Thanks RaiMan, that solved my question.