May Sound Stupid, but How Do I Do Multiplication?

Hello :) I'm fairly familiar with GameSalad, and have even published an App. However, I am having trouble with the simplest of things... how to multiply numbers. When I set a integer to 60*2 it will say NaN (Not a Number, I guess?). I've also tried (60*2). What am I doing wrong?

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    Hi @vorksholk

    with equations, expressions, divisions, multiplications, additions and subtractions, you need to input the numbers via the Expression Editor. This is accessed by clicking the little "e" symbol in the behaviour.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • vorksholkvorksholk Member Posts: 7

    Hi @vorksholk

    with equations, expressions, divisions, multiplications, additions and subtractions, you need to input the numbers via the Expression Editor. This is accessed by clicking the little "e" symbol in the behaviour.
    That's exactly how I did it... pressed the 'e' button, and typed in: 60*2 and it didn't work :(
  • DanDaMan123DanDaMan123 Member Posts: 216
    well I'm assuming that you will be multiplying changing and undefined values because otherwise if you just wanted 60*2 you could simplify yourself and insert 120. I don't know why 60*2 isn't working but you could try doing 60(2).
  • vorksholkvorksholk Member Posts: 7
    edited November 2012
    well I'm assuming that you will be multiplying changing and undefined values because otherwise if you just wanted 60*2 you could simplify yourself and insert 120. I don't know why 60*2 isn't working but you could try doing 60(2).
    Yeah, I was planning to substitute other variables in at some point soon :). Tried what you said, still doesn't work. Here is a screenshot of what I am doing: http://imgur.com/ZlmOf

    Another test:
    http://imgur.com/mR2zY <-- also gives NaN?
  • vorksholkvorksholk Member Posts: 7
    Oh, this is the windows version BTW, not sure if that makes a difference.
  • fogartyfogarty Member, PRO Posts: 181
    edited December 2012
    I'm having the same problem. I can't get the darn thing to multiply by 2. I've tried both of these:

    2*(270+game.TotalScore)
    2((270+game.TotalScore))

    It works fine when I don't try to multiply by 2 and just use 270+game.TotatScore.

    Does anyone have any suggestions? (I'm on a Mac.)

    Thanks!
  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    @vorksholk

    Stick sin(90)* in before the calculation.
Sign In or Register to comment.