[SOLVED] Can't access function

Oops… never mind… the problem was in the constructor… when I used this.swap(id), then it’s fine.