B
Bluedevil9981
Guest
This has been bugging me for quite some time now! It really should be working as far as I can tell.
It all starts with scr_set_inv that goes like tis:
then to inv_create_item:
And then finally to the draw_gui of my inventory controller:
Absolutely nowhere in this chunk of code can I spot where this error is coming from!
I checked the global.item[8,x] over and over and no change seems to help. Any ideas?
It all starts with scr_set_inv that goes like tis:
///scr_set_inventory(num,sprite,name,type,damage,desc,rarity,ex1,ex2,req)
//---COLORS---
col_trash=c_gray;
col_common=c_white;
col_uncommon=c_lime;
col_rare= c_blue;
col_epic=c_purple;
col_legendary=c_orange;
//Don't remove this one!
inv_create_item(0,spr_no_item,"",0,0,0,0,0,0,"")
///////////////////////
inv_create_item(1,spr_1_000,"Rusted Iron Shortsword","Shortsword","1-4 Damage","It might be useful in a pinch.",col_trash,"","","1");
inv_create_item(2,spr_1_001,"Rusted Iron Broadsword","Broadsword","1-7 Damage","You're better off throwing it at the target.",col_trash,"","","1");
inv_create_item(3,spr_1_002,"Rusted Iron Battleaxe","Battleaxe","1-7 Damage","",col_trash,"","","1");
inv_create_item(4,spr_1_003,"Rusted Iron Dagger","Dagger","1-3 Damage","",col_trash,"","","1");
inv_create_item(5,spr_1_004,"Rusted Iron Hammer","Hammer","1-6 Damage","",col_trash,"","","1");
inv_create_item(6,spr_1_005,"Rusted Iron Spear","Spear","1-7 Damage","",col_trash,"","","1");
//---COLORS---
col_trash=c_gray;
col_common=c_white;
col_uncommon=c_lime;
col_rare= c_blue;
col_epic=c_purple;
col_legendary=c_orange;
//Don't remove this one!
inv_create_item(0,spr_no_item,"",0,0,0,0,0,0,"")
///////////////////////
inv_create_item(1,spr_1_000,"Rusted Iron Shortsword","Shortsword","1-4 Damage","It might be useful in a pinch.",col_trash,"","","1");
inv_create_item(2,spr_1_001,"Rusted Iron Broadsword","Broadsword","1-7 Damage","You're better off throwing it at the target.",col_trash,"","","1");
inv_create_item(3,spr_1_002,"Rusted Iron Battleaxe","Battleaxe","1-7 Damage","",col_trash,"","","1");
inv_create_item(4,spr_1_003,"Rusted Iron Dagger","Dagger","1-3 Damage","",col_trash,"","","1");
inv_create_item(5,spr_1_004,"Rusted Iron Hammer","Hammer","1-6 Damage","",col_trash,"","","1");
inv_create_item(6,spr_1_005,"Rusted Iron Spear","Spear","1-7 Damage","",col_trash,"","","1");
then to inv_create_item:
///inv_create_item(number,sprite,name,type,damage min-max,descrip,global.colRarity,extra1,extra2,"level req")
sprite[argument0]=argument1;
text[argument0]=argument2;
global.item[0,argument0] = argument1; //sprite
global.item[1,argument0] = argument2; //name
global.item[2,argument0] = argument3; //type
global.item[3,argument0] = argument4; //damage
global.item[4,argument0] = argument5; //descrip
global.item[5,argument0] = argument6; //rarity
global.item[6,argument0] = argument7; //extra1
global.item[7,argument0] = argument8; //extra2
global.item[8,argument0] = string("Requires Level "+string(argument9)); //level req
sprite[argument0]=argument1;
text[argument0]=argument2;
global.item[0,argument0] = argument1; //sprite
global.item[1,argument0] = argument2; //name
global.item[2,argument0] = argument3; //type
global.item[3,argument0] = argument4; //damage
global.item[4,argument0] = argument5; //descrip
global.item[5,argument0] = argument6; //rarity
global.item[6,argument0] = argument7; //extra1
global.item[7,argument0] = argument8; //extra2
global.item[8,argument0] = string("Requires Level "+string(argument9)); //level req
And then finally to the draw_gui of my inventory controller:
scr_draw_inv();
if (blhover) {
scr_draw_hover(
global.item[0,pitem],
global.item[1,pitem],
global.item[2,pitem],
global.item[3,pitem],
global.item[4,pitem],
global.item[5,pitem],
global.item[6,pitem],
global.item[7,pitem],
global.item[8,pitem]
);
}
if (blhover) {
scr_draw_hover(
global.item[0,pitem],
global.item[1,pitem],
global.item[2,pitem],
global.item[3,pitem],
global.item[4,pitem],
global.item[5,pitem],
global.item[6,pitem],
global.item[7,pitem],
global.item[8,pitem]
);
}
Absolutely nowhere in this chunk of code can I spot where this error is coming from!
DoConv :1: illegal array use
at gml_Object_obj_inventory_DrawGUI_1 (line 12) - global.item[8,pitem]
############################################################################################
at gml_Object_obj_inventory_DrawGUI_1 (line 12) - global.item[8,pitem]
############################################################################################
I checked the global.item[8,x] over and over and no change seems to help. Any ideas?