GameMaker: Studio

GameMaker: Studio

データを表示:
Not set before reading it, what is happening?
The program noticed me this error
ERROR!!! :: ############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object obj_player:


Variable obj_player.rigth_key(100005, -2147483648) not set before reading it.
at gml_Script_scr_move_state (line 5) - xaxis = (rigth_key - left_key);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_scr_move_state (line 5)
called from - gml_Object_obj_player_StepNormalEvent_1 (line 2) - scr_move_state();



the code is
/// scr_move_state
scr_get_input();

// get the axis
var xaxis = (rigth_key - left_key);
var yaxis = (down_key - up_key);

// get direction
var dir = point_direction(0, 0, xaxis, yaxis);

// get the length
if (xaxis == 0 and yaxis = 0) {
len = 0;
} else {
len = spd;

}

// get the hspd and vspd
hspd = lengthdir_x(len, dir);
vspd = lengthdir_y(len, dir);

// move
phy_position_x += hspd;
phy_position_y += vspd;

// Control the sprites
image_speed = .2;
if (len == 0) image_index = 0;


// Vertical Sprites
if (vspd > 0) {
sprite_index = spr_player_down;
} else if (vspd < 0) {
sprite_index = spr_player_up;
}

// Horizontal Sprites
if (hspd > 0) {
sprite_index = spr_player_right;
} else if (hspd < 0) {
sprite_index = spr_player_left;
}




Somebody can help me? i really dont know what is happening.


最近の変更は🎃Wonka🎃が行いました; 2017年3月13日 17時08分
< >
1-8 / 8 のコメントを表示
Blind 2017年3月13日 17時24分 
Variable obj_player.rigth_key(100005, -2147483648) not set before reading it.

Variable not set before reading it.
I cannot understand, you can explain? please?
Wonka の投稿を引用:
I cannot understand, you can explain? please?
Looks like you misspelled right key

whereever oj_player.right_key is supposed to be written.
i writed "obj_player.right_key" but give errors inside the code
var xaxis = (rigth_key - left_key);

rigth_key

That's (probably) a typo. Did you actually name the variable "right_key"?

Anyways, the game doesn't see a variable set called "rigth_key" and then throws the error that it is attempting to read something that hasn't been set yet.
i have a similar problem with cyop vigilante if he walks for 1 milisecond this error shows up:
___________________________________________
############################################################################################
ERROR in
action number 1
of Step Event0
for object obj_vigilanteboss:

Unable to find instance for object index -4
at gml_Script_scr_vigilante_walk
############################################################################################
gml_Script_scr_vigilante_walk (line -1)
gml_Object_obj_vigilanteboss_Step_0
kamil.grzempa の投稿を引用:
i have a similar problem with cyop vigilante if he walks for 1 milisecond this error shows up:
___________________________________________
############################################################################################
ERROR in
action number 1
of Step Event0
for object obj_vigilanteboss:

Unable to find instance for object index -4
at gml_Script_scr_vigilante_walk
############################################################################################
gml_Script_scr_vigilante_walk (line -1)
gml_Object_obj_vigilanteboss_Step_0
the problem is you are trying to reference an object_index that equals 'noone' or -4. Make sure when referencing and object_index you give it the proper one. You didn't supply the script that is actually throwing the error so it's hard to tell how to fix it.
最近の変更はThe Winter Budが行いました; 2023年6月18日 15時59分
PLZ HELP!!!!!!
I want to use the cyop mod but everytime it launches i get an error from pizza tower
And pizza oven patches them successfully but always get this error everytime i launch it.

Saying:
ERROR in
action number 1
Of Create Event
for object <undefined>:

Error attempting to load wad file with unexpected size 7018496 szFORM 3
---------------------------------------------------------------------------------
PLZ HELP!!!!! I WANT TO USE IT PLZ!!!!!!!!
< >
1-8 / 8 のコメントを表示
ページ毎: 1530 50