Today's guide will be about how to properly put code in your forum thread,
I'm putting this in the programming forum because it will be easier for people who commit this crime to see it and learn how to create a thread properly.
If you would like a more serious and detailed tutorial please read this post by Frosty cat
(Posting code on the programming forum dos and donts)
NOTE:
At the time of this tutorial, Their is no way to convert GML Visual (drag&drop) to a plain text format,
if you are using GML Visual, Supplying a clean picture of the code is fine,
If on windows you can use (win)+shift+S, and select a part of your monitor to capture as an png that will be saved to the clipboard.
open paint or the like, and ctrl+v on the canvas, then save as a png,
you can upload this to the forum using the img icon, next to the chain link and </> icons.
Alternatively upload the png to imgur and supply the image url, (right click> copy image address) instead of uploading the png.
When using imgur sometimes you will need to get the image address twice as the first time will give a bad link
HOWEVER
If you are not using gml visual, PLEASE DO NOT ATTACH A PHOTO OF YOUR CODE, COPY PASTE IT IN CODE BLOCKS!!!
Often then not, the image of your code will be hard to see as well as prevent people from coping the code to test the errors for themselves.
No one is going to steal your code, so don't worry about that please.
DO NOT PUT YOUR CODE AS PLAIN TEXT
if you do, You make the code harder to read for someone trying to help
as well as get errors like:
Emojis where characters are meant to be:
if (bad_at_putting_code)
{
thread = (bad
}
Incorrect formatting and spacing:
if (startmovie_stage == 2){
if !audio_is_playing(snd_sfx_startmovie_hiphop){
audio_play_sound(snd_sfx_startmovie_hiphop,1,false);
startmovie_stage = 3;
}
}
Why does this happen?
This is because the forum is considering your code as text such as this you are currently reading, and formatting it as such, thus the errors.
This is why code blocks are important to use and helps you help us help all
DO
STEP 1:
Head on over to the programming section, and slap that post thread button
STEP 2:
Make sure to give your post a prefix that matches your post, ie if you are using GameMaker(latest) or Legacy, HTML5, Opera gx ...ect
Give it a good title so people get a good idea about what your issue is, make it sort and sweet but descriptive
then in the bar go over to the three ... and select code from the drop down
STEP 3:
Make sure the Language is set to GML
and copy paste your code into the box.
feel free to always check if your code is in a code block by pressing the preview button
STEP 4:
Make sure your code is in between two [ CODE ] blocks
make sure to explain your code, we don't know your garble of if statements, but don't over do it, not everyone here is slow,
after that Congratulations you can preview it as it would show, or post your new thread,
Happy coding and good luck on any problems in the future!
Addendum:
Do not use the inline code blocks
they make your code look worse then the broken unicode ones.
inline codes use the [ iC0de ] blocks
you need to use normal [ c0de ] blocks
Don't do this! Only villains do this!
I'm putting this in the programming forum because it will be easier for people who commit this crime to see it and learn how to create a thread properly.
If you would like a more serious and detailed tutorial please read this post by Frosty cat
(Posting code on the programming forum dos and donts)
NOTE:
At the time of this tutorial, Their is no way to convert GML Visual (drag&drop) to a plain text format,
if you are using GML Visual, Supplying a clean picture of the code is fine,
If on windows you can use (win)+shift+S, and select a part of your monitor to capture as an png that will be saved to the clipboard.
open paint or the like, and ctrl+v on the canvas, then save as a png,
you can upload this to the forum using the img icon, next to the chain link and </> icons.
Alternatively upload the png to imgur and supply the image url, (right click> copy image address) instead of uploading the png.
When using imgur sometimes you will need to get the image address twice as the first time will give a bad link
HOWEVER
If you are not using gml visual, PLEASE DO NOT ATTACH A PHOTO OF YOUR CODE, COPY PASTE IT IN CODE BLOCKS!!!
Often then not, the image of your code will be hard to see as well as prevent people from coping the code to test the errors for themselves.
No one is going to steal your code, so don't worry about that please.
DO NOT PUT YOUR CODE AS PLAIN TEXT
if you do, You make the code harder to read for someone trying to help
as well as get errors like:
Emojis where characters are meant to be:
if (bad_at_putting_code)
{
thread = (bad
}
Incorrect formatting and spacing:
if (startmovie_stage == 2){
if !audio_is_playing(snd_sfx_startmovie_hiphop){
audio_play_sound(snd_sfx_startmovie_hiphop,1,false);
startmovie_stage = 3;
}
}
Why does this happen?
This is because the forum is considering your code as text such as this you are currently reading, and formatting it as such, thus the errors.
This is why code blocks are important to use and helps you help us help all
DO
STEP 1:
Head on over to the programming section, and slap that post thread button
STEP 2:
Make sure to give your post a prefix that matches your post, ie if you are using GameMaker(latest) or Legacy, HTML5, Opera gx ...ect
Give it a good title so people get a good idea about what your issue is, make it sort and sweet but descriptive
then in the bar go over to the three ... and select code from the drop down
STEP 3:
Make sure the Language is set to GML
and copy paste your code into the box.
feel free to always check if your code is in a code block by pressing the preview button
STEP 4:
Make sure your code is in between two [ CODE ] blocks
make sure to explain your code, we don't know your garble of if statements, but don't over do it, not everyone here is slow,
after that Congratulations you can preview it as it would show, or post your new thread,
Happy coding and good luck on any problems in the future!
Addendum:
Do not use the inline code blocks
they make your code look worse then the broken unicode ones.
inline codes use the [ iC0de ] blocks
you need to use normal [ c0de ] blocks
Don't do this! Only villains do this!
if (bad_at_putting_code){
thread = (bad;)
}
with(obj_startmovie_skele){
other.skele_in_position = in_position;
}
if (skele_in_position) && (startmovie_stage == 1){
audio_play_sound(snd_sfx_startmovie_hiphop,1,false);
startmovie_stage = 2;
}
if (startmovie_stage == 2){
if !audio_is_playing(snd_sfx_startmovie_hiphop){
audio_play_sound(snd_sfx_startmovie_hiphop,1,false);
startmovie_stage = 3;
}
}
if (startmovie_stage == 3){
if !audio_is_playing(snd_sfx_startmovie_hiphop){
startmovie_stage = 4;
}
}
if (startmovie_stage == 4){
with(obj_startmovie_gengar){
image_speed = 1;
}
startmovie_stage = 5;
}
if (startmovie_stage == 5){
with(obj_startmovie_gengar){
other.gangar_speed = image_speed;
}
if (gangar_speed == 0){
audio_stop_sound(snd_mus_titlemovie);
alarm[1] = room_speed / 2;
with(obj_startmovie_skele){
draw_mouth = true;
image_index = 1;
}
startmovie_stage = 6;
}
}
Last edited: