guannstar's Recent Forum Activity

  • I did what you said, but that just duplicates the number in the textbox (turns 11 into 1111), it doesn't add the values together (like 11 + 11 = 22).

    https://dl.dropboxusercontent.com/u/541 ... mple2.capx

  • Hello all. I was wondering, how do you add (and only add) the textbox values you input into the box, and have the answer show up as the text beside the textbox? Whatever you type into the textbox should keep adding on to the text/number beside it.

  • You are not doing anything wrong..

    Have you looked at what the whole string is before using the right() expression?

    What you are seeing are the last 4 letters of that string..

    Everything is working like it should

    Thanks for all the help man. I get it now.

  • If you just set it to 'Browser.ExecJS("Date()")' you'll then see why the statement is showing text (for me, it shows 'Wed Oct 07 2015 18:25:03 GMT+0100 (GMT Standard Time)' therefore the last 4 characters are 'ime)')

    If the format of the returned date is consistant, then you could try:

    mid(Browser.ExecJS("Date()"),11,4)

    which for me shows just the yesr.

    Thanks for this. It helps a lot.

  • (Yes, I did read the post, I just don't get what I'm doing wrong.) Hey Okay, so I took out the index number (like so... right(Browser.ExecJS("Date()"),4)), but it still isn't working. It shows letters, instead of numbers. Can you pleeeaase show me how do it with a small capx example? I'm starting to feel like an idiot over here lol.

  • Hey LittleStain, lol okay, so, I'v coded in, right(Browser.ExecJS("Date()"),4,4). But, it says I need only 2 parameters, not 3. Which parameter should I remove for it to work correctly?

  • Hey LittleStain, again. I guess what I mean to ask is... What exactly does the 4,3 values represent in mid(Browser.ExecJS("Date()"),4,3)?

  • Hey LittleStain, mid(Browser.ExecJS("Date()"),4,3) works... It shows that it's Oct. But, when I changed mid to right or left, it comes up with an error saying "Wrong number of parameters ('right' does not take 3 parameters, should have 2) ". How do I get around that?

  • Okay, I'll try that.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey LittleStain, I still don't get where you actually insert "mid(text-variable,4,3)" into Browser.ExecJS("Date()"). Sorry, I know it seems simple, but I still don't get it (I'm a visual learner). Can you please show me with a tiny capx example? It would be greatly appreciated.

  • Bump...

  • Sorry I guess I should have asked instead, where exactly would I put the left, right, or mid in this: Browser.ExecJS("Date()")

guannstar's avatar

guannstar

Member since 14 May, 2013

None one is following guannstar yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies