YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
21 stars 8 forks source link

Javascript Exception Thrown #4454

Closed gm-bug-reporter[bot] closed 7 months ago

gm-bug-reporter[bot] commented 7 months ago

Description

I have been following the rollback tutorials to create a multiplayer game with my friend. We have been trying to adjust the code to put the game on GX.games and it tells us an exception has been thrown and to check the javascript console, but there are no errors we have found or been able to correct. Please help me understand this so we can continue our work on our multiplayer game.

Steps To Reproduce

create game object 'obj_game' put code into 'create' event, "rollback_define_player(obj_player);

var _joined = rollback_join_game();

if (!_joined) { rollback_create_game(2, false); }"

add game object, 'obj_player', use code for spawning into the game inside of a 'create' event, "y = room_height / 2;

if (player_id == 0) { x = 50; } else if (player_id == 1) { x = room_width - 50; }"

add 'step' event, insert code, "var move_speed = 1; var _input = rollback_get_input();

if (_input.left) { x -= move_speed; } if (_input.right) { x += move_speed; } if (_input.up) { y -= move_speed; } if (_input.down) { y += move_speed; }"

Target GX.games while signed into GX.games account with region set to north america. Run code into browser, on the screen it says, "Exception thrown, see JavaScript console". There are no error messages in the console.

7e3ec4b7-cc7f-481f-8d1c-374117260104

stuckie commented 7 months ago

This is not a bug with GameMaker itself, but one in your project, so I will close this issue now. For coding support, please visit the GameMaker Community forum and create a thread there, asking for advice.