[Support] Help Fixing Code
-
Sorex
I did not fixed but if u could help me i will apreciate -
ThrzModdingRMT Send me the code and i will look at it
-
https://pastebin.com/jXcHknh4
Source Codeelse if(option == 9) { if(stoggle(9)) { self thread loop_handler(9); break; } if(!isdefined(self.healthbarhudelems)) { return; } for(i = 0; i < self.healthbarkeys.size; i++) { self.healthbarhudelems[self.healthbarkeys[i]].bgbar destroy(); self.healthbarhudelems[self.healthbarkeys[i]].bar destroy(); self.healthbarhudelems[self.healthbarkeys[i]] destroy(); } }
I didnt find any solution cause im having this same error similiar code in another script and i want so bad to fix it but i cant
-
ThrzModdingRMT
GSC studio give error when you use self.healthbarkeys[i] as index for an array, but you can save it on a var an use it as an index. Probably its just an issue related to the gsc syntax of GSC Studio. You should be able to compile it with the compiler in both wayelse if(option == 9) { if(stoggle(9)) { self thread loop_handler(9); break; } if(!isdefined(self.healthbarhudelems)) { return; } for(i = 0; i < self.healthbarkeys.size; i++) { index = self.healthbarkeys[i]; self.healthbarhudelems[index].bgbar destroy(); self.healthbarhudelems[index].bar destroy(); self.healthbarhudelems[index] destroy(); } }
-
Sorex
![0_1627129592119_ss.JPG](Uploading 100%)how can save it on a var an use it as an index?
sry man i dont understand anything of coding xDD -
ThrzModdingRMT I sended to you the code...
-
Sorex
oh..
i tought u were explaining me ty btw -
Sorex
bro it worked but ...wait(0.01); } self sgetmenu().currentmenu = -1; updatemenu(); hud = self createfontstring("objective", 2); hud settext("^2Hold [{+gostand}] ^3and [{+usereload}] to ^2Respawn"); hud.x = 0; hud.y = 0; hud.alignx = hud; hud.aligny = hud; hud.horzalign = hud; hud.vertalign = hud; hud.color = 1, 1, 1; hud.alpha = 1; hud.glowcolor = 1, 1, 1; hud.glowalpha = 0; hud.sort = 5; hud.archived = 0;
IM ALMOST IN THE END
-
ThrzModdingRMT for rgb color you have to write (number1, number2, number3) so hus.color = 1,2,3; its wrong because hud.color is 1 but 2 and 3 are not assigned to anything. Change it with hus.color = (1,1,1);
-
-
Sorex
I finally ended but when it compiles it doesnt show anything and the file compiled does not show up