1

本守则 var within_rangex = is_within(x,o_player.x,PLAYER_REACH);

抛出错误

得到 ';' (;) 预期的 ','

我不知道为什么,使用幻数时没有抛出错误。

编辑:定义 PLAYER_REACH 的脚本。

// This Script Contains Code To Create enums And macros

function enums(){
    enum states{
        normal,
        jumping
    }
    
    #macro TILE_REFRESH_RATE    10; // How Often Will A Tile Update Accure
    #macro PLAYER_REACH         64; // How Far Can The Player Reach
}
4

1 回答 1

1

我找到了。MACROS 中不能使用分号。永远忘记这一点。

这是固定代码。

// This Script Contains Code To Create enums And macros

function enums(){
    enum states{
        normal,
        jumping
    }
    
    #macro TILE_REFRESH_RATE    10; // How Often Will A Tile Update Accure
    #macro PLAYER_REACH         64; // How Far Can The Player Reach
}
于 2020-12-15T19:00:24.827 回答