SET (Card Game)

There is a game called SET that I am programming.
Link:

Not sure why, but sometimes there are undefined errors.
Please help.