GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Confused:S

AdnanHAdnanH Posts: 77Member

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 Posts: 144Member

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

  • AdnanHAdnanH Posts: 77Member

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

  • jeezzcakejeezzcake Posts: 144Member
    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 Posts: 77Member

    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 Posts: 77Member
    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 Posts: 144Member
    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.Posts: 12,822Member

    @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 Posts: 77Member

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

Sign In or Register to comment.