Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

Man, I love GameMaker. What a good, transparent language with predictable behaviour:

function scr_test(){
    var a = int64(10000000000000001);
    var tr = real(2);
    var ti = int64(2);
    var ta = 2;
    show_debug_message(a % tr); // 0
    show_debug_message(a % ti); // 1
    show_debug_message(a % ta); // 0
    show_debug_message(a % 2); // 1
}

I don’t know what I’m supposed to do with this. The modulo operator works differently depending on whether you give it a variable or the same value directly.