V1RU5
Known Member
- Messages
- 3
- Reaction score
- 2
- Points
- 103
[SOLVED]
Thank you @P!X and @ISOCheatedIt was just because Developer was set to 1.
I know this game is dead but I want to make a single player menu just because.
Im using this as 'createRectangle'
Code:
createRectangle(align, relative, x, y, width, height, color, alpha, sorting, shadero)
{
barElemBG = newHudElem(self);
barElemBG.elemType = "bar";
barElemBG.width = width;
barElemBG.height = height;
barElemBG.align = align;
barElemBG.relative = relative;
barElemBG.xOffset = 0;
barElemBG.yOffset = 0;
barElemBG.children = [];
barElemBG.color = color;
barElemBG.alpha = alpha;
barElemBG setShader( shadero, width , height );
barElemBG.hidden = false;
barElemBG.sort = sorting;
barElemBG setPoint(align,relative,x,y);
return barElemBG;
}
Here is the shader I'm trying to use (its pre-cached)
Code:
_createhud()
{
self.Hud["BG"] = createRectangle("TOP", "TOP", 190, 0, 200, 200, (0,0,0), (1/4), 0, "white");
}
_destroyhud()
{
self.Hud["BG"] destroy();
}
So the problem is every time I open the menu it shows the shader but I get this error and I don't know how to fix it.
Code:
******* Script runtime error *******
cannot cast undefined to int: (file ' maps/_hud_util.gsc', line 183)
self.bar.x = self.x - int((self.wudth - self.padding) / 2);
*
Error: called from:
(file 'maps/_hud_util.gsc', line 161)
setPointBar( point, relativePoint, xOffset, yOffset);
*
Error: called from:
(file 'maps/_main.gsc', line 130)
barElemBG setPoint(align,relative,x,y);
*
Error: called from:
(file 'maps/_main.gsc', line 85)
self.Hud["BG"] = createRectangle("TOP", "TOP", 190, 0, 200, 200, (0,0,0), (1/4), 0, "white");
*
Error: called from:
(file 'maps/_main.gsc', line 43)
self _createHud();
*
Error: called from:
(file 'maps/_main.gsc', line 58)
wait 0.1;
*
Last edited: