StormLight
Member
I'm bringing code from my old game into my multiplayer game, which just displays the gun in front of you. When I put the code to fit the multiplayer game:
When I join the server, I get this error:
(P.S Cool that it put general code instead of GML automatically after seeing the word 'error'!)
spr_gun is a sprite I made, and it turns red in the code. I have no idea what is up.
GML:
var gunX = x + lengthdir_x(5, image_angle);
var gunY = y + lengthdir_y(5, image_angle);
var gunAngle = point_direction(x, y, mouse_x, mouse_y);
draw_sprite_ext(spr_gun, 0, gunX, gunY, 1, 1, gunAngle, c_white, 1);
Code:
ERROR in
action number 1
of Draw Event
for object obj_client:
Variable obj_client.spr_gun(100067, -2147483648) not set before reading it.
at gml_Object_obj_client_Draw_0 (line 11) - draw_sprite_ext(spr_gun, 0, gunX, gunY, 1, 1, gunAngle, c_white, 1);
############################################################################################
gml_Object_obj_client_Draw_0 (line 11)
spr_gun is a sprite I made, and it turns red in the code. I have no idea what is up.