1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

Mac OSX Not recognizing certain commands on GML

Discussion in 'GameMaker Studio 2 Community Tech Support' started by Keya, Oct 30, 2019.

  1. Keya

    Keya Member

    Joined:
    Oct 30, 2019
    Posts:
    1
    I've been working on a simple project for a few weeks, just for fun, mostly, but all this time, I've been using a Windows 10. To keep working on it in my MacOS, I installed GMS2 on it (after tons of confusion), then playtested it immediatly. Everything was fine until I checked the coding...

    It's a DND project that mostly uses the Execute Code block to operate, and certain commands (,like (keyboard_check_pressed), for example,) weren't recognized, and the program acted like they were variables. I was ignoring it, as it seemed to not actually do a thing, until eventually the game started crashing as soon as it starts running.

    upload_2019-10-29_22-30-13.png
     

    Attached Files:

  2. chirpy

    chirpy Member

    Joined:
    Oct 6, 2016
    Posts:
    156
    Edit: uh, my eyes got weird (so I counted the parentheses wrong at first).
    What are the exact warning messages?
     
    Last edited: Oct 30, 2019
  3. Amon

    Amon Member

    Joined:
    Sep 13, 2016
    Posts:
    277
    Instead of 'or' use '!!'. And put a var infront of each of the variables var right, var left, var jump.
     
  4. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,646
    You want pipes || not exclamation marks !! ;)

    OP - post the warning messages like chirpy said, but this usually happens when there is some sort of error elsewhere and it cascades down through the code causing other things not to be recognised correctly by the parser.
     
    Nocturne and Amon like this.
  5. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,977
    Apart from what @rIKmAN says, check your parenthesis... on the first line of the code (and the second), for example, you have one too many closing ) at the end...
     
    chirpy likes this.
  6. chirpy

    chirpy Member

    Joined:
    Oct 6, 2016
    Posts:
    156
    I thought so at first until I typed them into text. Human eyes!
    Code:
    right = (keyboard_check(ord("D")) or (keyboard_check(vk_right)));
     
    Nocturne likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice