Scripts not being called when it should been called on create
What's wrong with my code?When i load up a new world,a script doesn't get called and not blocks were loaded
(2D Sandbox)
sometimes it doesn't even load up the room
code for planet_load:
index = argument0;
gms_bdb_open(real(index),true,on_planet_load);
Code for script to get called:
planet_index = real(gms_ini_game_read("planet_bdb_index",string(global.planet_name)));
planet_load(planet_index);
Replies (3)
Last message on 3 May 2021
Size43
(Administrator)
on
2 May 2021, 16:42:26
Did you disable error messages by any chance? (gms_debug_hide_errors) If so, try turning them back on. You might be missing some error message that is explaining what's going on.
cocainegt
(Topicstarter)
on
3 May 2021, 02:27:41
___________________________________________
############################################################################################
ERROR in
action number 1
of Step Event0
for object obj_server:
SERVER ERROR: Cannot edit the Binary Data Block of another player
Please note: This is a server-sided error message. To hide all GameMaker Server-errors, call gms_debug_hide_errors().
at gml_Script_XServer_step (line 408) - show_error("SERVER ERROR: " + XServer_readstring(_rr), false);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_XServer_step (line 408)
called from - gml_Script_gms_step (line 59) - __ret = XServer_step(__current_room);
called from - gml_Object_obj_server_StepNormalEvent_1 (line 2) - gms_step();
Size43
(Administrator)
on
3 May 2021, 12:43:30
You are trying to write to the BDB of another player (a player BDB is a BDB with an ID that is the negation of the PlayerID, so for example if my player ID is 5, my BDB would have ID -5). You cannot write BDBs of other players. You'll have to use the BDBs that are writable by anyone (BDBs numbered 0, 1, 2, 3, ..).