Confused:S

AdnanHAdnanH Member Posts: 77

okay so i have two pieces of shortcode that id like to share with you..

one is called Gameover.png and the other score.png the part that confuses me is the score one doesn't work it just always restarts my game instead? but as you can clearly see in the pictures in score the colours have to match where as for game over they don't match? i believe the attribute "is not" doesn't work? which makes the game always be over regarding if your right or wrong?:/

Comments

  • jeezzcakejeezzcake Member Posts: 144

    self.color and game.whichColor are both text attributes?

  • AdnanHAdnanH Member Posts: 77

    yes they are? does that make a difference to why its not working for me? or are you asking in general?:)

  • jeezzcakejeezzcake Member Posts: 144
    edited October 2014

    Log the game.Score and game.GameOver attributes using "Log Debugging Statement" Behaviour.

    Also Log self.color and game.WhichColor.

    CMD + D -> will bring the debugger window.

  • AdnanHAdnanH Member Posts: 77

    It doesn't show me anything? unless I'm doing it wrong.. if your not too busy would you mind showing me how you'd lay it out please?

  • AdnanHAdnanH Member Posts: 77
    edited October 2014

    i forgot to mention my game.color is the name of a table and not really anything more..
    all it comes of in the debugger winder is "invalid expression"? how would i sort this out?:S

  • jeezzcakejeezzcake Member Posts: 144
    1. when you create a table, it's a good practice to suffix it with TBL identifier (i.e. colorTBL)
    2. you must compare self.color with a value from your table (i.e. self.color is not tableCellValue(colorTBL,row,column), where row&column indicates the cell where you have the colour )
  • SocksSocks London, UK.Member Posts: 12,822

    @AdnanH said:
    yes they are? does that make a difference to why its not working for me? or are you asking in general?:)

    It shouldn't be an issue - text attributes can hold numerical values and be used just like numerical attributes.

  • AdnanHAdnanH Member Posts: 77

    Thanks guys I shall implement everything as soon as I can:) I appreciate the help!!:-)

Sign In or Register to comment.