Jump to content

Need help with Programming Code

Okay so I do not know how many of you are familiar with the programming language that game maker uses but I need your help, I do not know where I have gone wrong with my code, all the help would be appreciated

post-15540-0-38159300-1380534299_thumb.p

Link to comment
Share on other sites

Link to post
Share on other sites

First, what code is this supposed to be (game creators use lots of different code), second what are you trying to achieve, third what went wrong with the code (meaning what function did it not fulfill properly).

 

Spoiler

Case Bitfenix Ghost, Mobo Asus Maximus VIII Ranger, CPU i7 6700K @4.2 Ghz cooled by Arctic cooling Freezer i30, (barely). GPU Nvidia GTX 970 Gigabyte G1 @1519Mhz core, RAM 16Gb Crucial Ballistix CL16 @2400Mhz. SSD 128GB Sandisk Ultra Plus as my OS drive. HDD's  1TB  Seagate ST31000524AS its OEM, 3TB Seagate Barracuda, 2x 500GB WDC Blue (RAID 0)

If it isn't working absolutely perfectly, according to all your assumptions, it is broken.

Link to comment
Share on other sites

Link to post
Share on other sites

Not that I can be of help, but I'd just like to say that pasting the copy will help others debug because they don't have to type it themselves.

Grammar nazis are people too!
Treat your local grammar nazi nicely and he might teach you a thing or two. (Note that I'm Belgian and not a native English speaker.)
Chivalry isn't dead!

Link to comment
Share on other sites

Link to post
Share on other sites

The content of that last IF-statement looks very weird, though I'm not familiar with GML. Can you really just type something like "check sound is not already playing [...]", wouldn't you need to query, say, a variable and check if the sound is playing or not?

Cheers,

Linus

Link to comment
Share on other sites

Link to post
Share on other sites

Not familiar with GML but I think that your comparison operator should be "=="; as in:

if(image_index == 2 or 6) {bla bla}

A single equal sign like you used is generally for assignment.

 

The content of the statement looks weird to me as well, but no GML experience so I can't comment more than that.

CPU: Intel 3930K @ 4.6GHz || MOBO: Asus P9X79-E WS || GPU: 2x Nvidia GTX Titans || CASE: Fractal Design Define XL R2 || PSU: Corsair AX1200i


RAM: 32GB Dominator Platinum @ 2100 MHz || Storage: 240GB Samsung 840 Pro & 2TB Seagate Barracuda || Sound: Asus Xonar Essence STX


Peripherals: Samsung S27B970D - Asus PB23HQ - Logitech MX Revolution - Corsair K95 - Samson Meteor Mic - Logitech C920 - Bowers&Wilkins MM-1

Link to comment
Share on other sites

Link to post
Share on other sites

Not familiar with GML but I think that your comparison operator should be "=="; as in:

if(image_index == 2 or 6) {bla bla}

A single equal sign like you used is generally for assignment.

 

The content of the statement looks weird to me as well, but no GML experience so I can't comment more than that.

Thanks for the help it has fixed my problem, such a stupid mistake haha.

Link to comment
Share on other sites

Link to post
Share on other sites

Thanks for the help it has fixed my problem, such a stupid mistake haha.

 

You're welcome!

 

Just imagine how many times I did it myself to end up spotting it right away :D Should make you feel better

CPU: Intel 3930K @ 4.6GHz || MOBO: Asus P9X79-E WS || GPU: 2x Nvidia GTX Titans || CASE: Fractal Design Define XL R2 || PSU: Corsair AX1200i


RAM: 32GB Dominator Platinum @ 2100 MHz || Storage: 240GB Samsung 840 Pro & 2TB Seagate Barracuda || Sound: Asus Xonar Essence STX


Peripherals: Samsung S27B970D - Asus PB23HQ - Logitech MX Revolution - Corsair K95 - Samson Meteor Mic - Logitech C920 - Bowers&Wilkins MM-1

Link to comment
Share on other sites

Link to post
Share on other sites

I'm not sure about that language in particular but in most if you do

if(x == 2 or 6)

it will always be true because 6 (or any other number, char, etc. except 0) will always evaluate to true.

Link to comment
Share on other sites

Link to post
Share on other sites

I'm not sure about that language in particular but in most if you do

if(x == 2 or 6)

it will always be true because 6 (or any other number, char, etc. except 0) will always evaluate to true.

 

Yeah normally it is something like if (x == 2 or x == 6)

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×