Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Stacking code?

A topic by Alex Rummel created Mar 09, 2018 Views: 306 Replies: 3
Viewing posts 1 to 3

A question of this nature was already previously asked, but it was a little vague on the answer. Is this legal?

if ( variable = true ) 

{

sprite_index = spr_sprite;image_index=1;

}

Or do we have to do this instead?


if ( variable = true )

{

sprite_index = spr_sprite;

image_index = 1;

}

Regardless of what these commands may be (draw_text, draw_set_colour, ds_list_add), which of these is legal syntax?

It was stated, I believe, that the first of these two is correct.

After any semicolon, there should be a new line.

Host

if ( variable = true )

{

sprite_index = spr_sprite;

image_index = 1;

}


This is the correct way and would count as 5 lines of code

Thank you for the clarification!