Greg M. Krsak
Greg M. Krsak

Reputation: 2132

Haxe: "Int cannot be called"

This one really got me for a while.

Problem

If you're reading this question, perhaps you're getting a mysterious "Int cannot be called" message

103: characters 22-29 : Int cannot be called

when you try to compile your Haxe application.

Upvotes: 1

Views: 572

Answers (1)

Greg M. Krsak
Greg M. Krsak

Reputation: 2132

Solution

Consider that you may be adding parentheses where they don't belong. For example, I have a class with public variable level

public var level(getLevel, setLevel):Int;

but was mistakenly referencing it, elsewhere, using parentheses

var charLevel:Int = c.level();

when I should have omitted the parentheses

var charLevel:Int = c.level;

Don't know why I did this, but I hope the information helps.

Upvotes: 1

Related Questions