GameMaker: Studio

GameMaker: Studio

查看统计:
🎃Wonka🎃 2017 年 3 月 13 日 下午 4:51
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 日 下午 5:08
< >
正在显示第 1 - 8 条,共 8 条留言
Blind 2017 年 3 月 13 日 下午 5:24 
Variable obj_player.rigth_key(100005, -2147483648) not set before reading it.

Variable not set before reading it.
🎃Wonka🎃 2017 年 3 月 13 日 下午 6:12 
I cannot understand, you can explain? please?
@KB_United 2017 年 3 月 13 日 下午 6:26 
引用自 Wonka
I cannot understand, you can explain? please?
Looks like you misspelled right key

whereever oj_player.right_key is supposed to be written.
🎃Wonka🎃 2017 年 3 月 14 日 下午 6:26 
i writed "obj_player.right_key" but give errors inside the code
kris40k 2017 年 3 月 14 日 下午 10:17 
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.
kamix.grzempa 2023 年 6 月 18 日 上午 4:01 
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 Winter Bud 2023 年 6 月 18 日 下午 3:57 
引用自 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 日 下午 3:59
UNderMIK3ys_L 2024 年 6 月 23 日 下午 8:46 
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