HTML5 Error when using ef_explosion

J

jaber

Guest
Hi,
I have used the ef_smoke perfectly in my HTML5 game. But when I use the ef_explosion as following (effect_create_above(ef_explosion, x, y, 2, c_red);) the game throws an error


GML:
Error: unable to convert rgb(0,0,0) to a number
--------------------------------------------------------------------
    function _td("unable to convert rgb(0,0,0) to a number")
    function yyGetReal("rgb(0,0,0)")
    function yyGetInt32("rgb(0,0,0)")
    function _tP(2, 1470, 150, 6, "rgb(0,0,0)", 1)
    function _9d2(2, 1470, 150, 2, 255)
    function _yk([unknown], 0, 1470, 150, 2, 255)
    function effect_create_above(0, 1470, 150, 2, 255)
    function gml_Script_scr_PlayerFire([instance], [instance], 5, 11, 0)
    function gml_Object_obj_Player_Step_0([instance], [instance])
    function(769, 0, [instance], [instance])
    function(769, 0, [instance], [instance])
    function(769, 0)
    function _WZ2()
    function _qZ2()
    function _5Z2(22212.971)
is there any work around or solution for this bug?
Thanks in advance
Jaber
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Please file a bug report. If the same code works for one particle effect it should work for all of them. As for a workaround, try supplying the hex value for the colour rather than the constant and see if that works, or simply use the number 255, which is what c_red should be anyway.
 
D

DawCrash

Guest
Hi! I have this exact error when I use ef_explosion too

This is the line that throws the error
GML:
effect_create_above(ef_explosion, x+sprite_width/2, y+sprite_height/2, 0, make_color_rgb(255,255,255));
I was using c_white but I replaced it with make_color_rgb, but this workaround didn't work (I just wanted to inform you of this, so I'll file a bug report too)

And this is the error in the Chrome console
Code:
Error: unable to convert rgb(0,0,0) to a number
--------------------------------------------------------------------
    function _Gh("unable to convert rgb(0,0,0) to a number")
    function yyGetReal("rgb(0,0,0)")
    function yyGetInt32("rgb(0,0,0)")
    function _kI(1, 464, 304, 1, "rgb(0,0,0)", 1)
    function _n22(1, 464, 304, 0, 16777215)
    function _yJ([unknown], 0, 464, 304, 0, 16777215)
    function _f5(0, 464, 304, 0, 16777215)
    function _b2([instance], [instance])
    function(1024, 0, [instance], [instance])
    function(1024, 0, [instance], [instance])
    function _c32()
    function _OU2()
    function _PU2()
    function _lU2()
    function _1U2(19589.862)
 
J

jaber

Guest
Please file a bug report. If the same code works for one particle effect it should work for all of them. As for a workaround, try supplying the hex value for the colour rather than the constant and see if that works, or simply use the number 255, which is what c_red should be anyway.
unfortunately, workaround did not work... hopefully Game maker will fix this bug
 
Top