Great, thanks!
oomgames
2
Posts
A member registered Mar 24, 2019
Recent community posts
Hi,
I'm having this issue when trying to update a function that uses another function with optional parameters. Here is a simple example:
function sc_draft(){
if live_call() return live_result////
with os_player
{
var f_weapon_dir = weapon_dir
var f_player_dir = direction + 1
var f_target_id = sc_nearest_enemy(, , , , true)
var f_t_focus = t_focus
}
}
It used to work on 2023.11. But now I have this error even if the changed codes have nothing to do with the function like adding "var i = 0".
[GMLive][19/03/2024 17:18:57][ERROR] Runtime error: [error] Variable <unknown_object>.x(0, -2147483648) not set before reading it.
called from sc_draft [line 8, col 37]
This is what sc_nearest_enemy look like:
/// @param number=1
/// @param object=op_enemies
/// @param x=-999
/// @param y=-999
/// @param include_1st_crates=false
function sc_nearest_enemy(
f_number = 1, f_object = op_enemies, f_x = -999, f_y = -999, f_include_1st_crates = false)
{
I saw you're working on the new patch changes. But I just wanted to give this feedback in case it's useful.
Thanks for GMLive. It is truely a game changer for developpers!
(I wanted to send screenshots, but for some reason itch.io game me an error, so I just copy/pasted the functions)