문제

I get an unexpected indent error when I try compiling this code:

class permanentItem extend Item 
    add: ->
        super()

    remove: ->
        super()

It is on the second line add: ->. I have tried commenting that and it still gives me the same error on remove: ->. Any ideas?

도움이 되었습니까?

해결책

You have a typo in your code. It should be extends instead of extend:

class permanentItem extends Item 
    add: ->
        super()

    remove: ->
        super()
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top