B
babs!
Guest
I'm making a game using networking, and I got this error, this shouldn't be a networking error, but I couldn't understand why this was happening.
Can someone explain this error, I never made the variable oClient.T , and I’m not trying to read it in the code. Also, I am not sure why it says Step 0 when I only have a step 1.
############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object oClient:
Variable oClient.T(100008, -2147483648) not set before reading it.
at gml_Object_oClient_Step_0
############################################################################################
Code:
oClient:
///Create Event:
connected = false;
get_string_async("Please enter a username", "");
spawned = false;
global.team = noone;
Join_Buffer = buffer_create(256, buffer_fixed, 1);
================================================================================
///Step Event:
//Spawn in Player….
// Based on What team is chosen by the server team autobalance, The server will send a //notification to this step event which will trigger the Alarm [0] loop to contsatly update sprite,x, // coords,y coords, and so on....
if(spawned = false){
if(global.team = T){
instance_create(oPlayer_T,96,640);
view_object = oPlayer_T;
alarm[1]=2;
spawned = true;
buffer_seek(Join_Buffer, buffer_seek_start, 0);
buffer_write(Join_Buffer, buffer_u8, MESSAGE_JOIN_T);
buffer_write(Join_Buffer, buffer_string, name);
network_send_raw(0, Join_Buffer, buffer_tell(Join_Buffer));
}
else if(global.team = CT){
instance_create(oPlayer_CT, 896,64);
view_object = oPlayer_CT;
alarm[2]=2;
spawned = true;
buffer_seek(Join_Buffer, buffer_seek_start, 0);
buffer_write(Join_Buffer, buffer_u8, MESSAGE_JOIN_CT);
buffer_write(Join_Buffer, buffer_string, name);
network_send_raw(0, Join_Buffer, buffer_tell(Join_Buffer));
}
}
Can someone explain this error, I never made the variable oClient.T , and I’m not trying to read it in the code. Also, I am not sure why it says Step 0 when I only have a step 1.
############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object oClient:
Variable oClient.T(100008, -2147483648) not set before reading it.
at gml_Object_oClient_Step_0
############################################################################################
Code:
oClient:
///Create Event:
connected = false;
get_string_async("Please enter a username", "");
spawned = false;
global.team = noone;
Join_Buffer = buffer_create(256, buffer_fixed, 1);
================================================================================
///Step Event:
//Spawn in Player….
// Based on What team is chosen by the server team autobalance, The server will send a //notification to this step event which will trigger the Alarm [0] loop to contsatly update sprite,x, // coords,y coords, and so on....
if(spawned = false){
if(global.team = T){
instance_create(oPlayer_T,96,640);
view_object = oPlayer_T;
alarm[1]=2;
spawned = true;
buffer_seek(Join_Buffer, buffer_seek_start, 0);
buffer_write(Join_Buffer, buffer_u8, MESSAGE_JOIN_T);
buffer_write(Join_Buffer, buffer_string, name);
network_send_raw(0, Join_Buffer, buffer_tell(Join_Buffer));
}
else if(global.team = CT){
instance_create(oPlayer_CT, 896,64);
view_object = oPlayer_CT;
alarm[2]=2;
spawned = true;
buffer_seek(Join_Buffer, buffer_seek_start, 0);
buffer_write(Join_Buffer, buffer_u8, MESSAGE_JOIN_CT);
buffer_write(Join_Buffer, buffer_string, name);
network_send_raw(0, Join_Buffer, buffer_tell(Join_Buffer));
}
}