Post: Need help with my menu base 1 script error :(
06-17-2015, 06:15 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); im getting 1 script error and have pulled out every hair in my head to figure it out, if you guys wouldnt mind giving me a hand?

    #include maps/mp/gametypes/_globallogic;
#include maps/mp/gametypes/_hud;
#include maps/mp/gametypes/_hud_util;
#include maps/mp/_utility;
#include common_scripts/utility;
#include maps/mp/gametypes/_rank;
#include maps/mp/teams/_teams;
#include maps/mp/killstreaks/_ai_tank;
#include maps/mp/killstreaks/_remotemissile;
#include maps/mp/killstreaks/_killstreaks;

init()
{
level thread onPlayerConnect();
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);
player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self waittill("spawned_player");
self thread Instuctions("","[{+melee}] and[{+speed_throw}] To Open The Menu | [{+usereload} To Select An Option | [{+attack}] To Scroll Down | [{+speed_throw}] To Scroll Up | [{+melee}] To Go Back",230,(0.611764705882353,0.423529411764706,1),(0.662745098039216,0.67843137254902,0.235294117647059));
self.inmenu = 0;
self.MenuOP = "nothing";
wait 2;
self thread MenuSetup();
}
}
Instuctions(text,controls,position,colour1,colour2)
{
self.Text2 = self Abc("default",1,"CENTER","CENTER",0,position,true,0,colour1);
self.Back = self createRectangle("CENTER","CENTER",0,position,1000,20,colour2,1,1,"white");
self.Text2 setText(text +" | "+ controls);}
Abc(Font,Size,AlignX,AlignY,X,Y,FGround,Sort,Colour)
{
Simplified = createFontString(Font,Size);
Simplified setPoint(AlignX,AlignY,X,Y);
Simplified.Sort = Sort;
Simplified.Foreground = FGround;
Simplified.Color = Colour;
return Simplified;
}

Abc(Font, Size, AlignX, AlignY, X, Y, FGround, Sort, Colour) {
Simplified = createFontString(Font, Size);
Simplified setPoint(AlignX, AlignY, X, Y);
Simplified.Sort = Sort;
Simplified.Foreground = FGround;
Simplified.Color = Colour;
return Simplified;
}
MenuSetup()
{
self.inmenu = 0;
self.Background = self createRectangle("CENTER", "CENTER", 200, -54, 0, 0, (0.662745098039216, 0.67843137254902, 0.235294117647059), 0, 0, "white");
self.Scroller = self createRectangle("CENTER", "CENTER", 200, -1054, 200, 20, (0.580392156862745, 0.411764705882353, 1), 1, 1, "white");
for (;Winky Winky
{
if (self meleeButtonPressed() && self adsButtonPressed() && self.MenuOP == "nothing" && self.inmenu == 0)
{
self thread Menu();
self.Background.Alpha = 1;
self.Background scale_over_time(.5, 200, 1000);
self.Scroller elemMoveY(.5, 0);
self NewMenu("MainMenu");
self freezecontrols(true);
self.inmenu = 1;
}
else if (self.inmenu == 1 && self attackButtonPressed())
{
self.MenuOP += 1;
if (self.MenuOP >= self.OPT[self.CurMenu].size)
{
self.MenuOP = 0;
}
self.Scroller elemMoveY(.2, (self.MenuOP * 22 - 150));
wait 0.2;
}
else if (self.inmenu == 1 && self adsButtonPressed())
{
self.MenuOP -= 1;
if (self.MenuOP < 0) {
self.MenuOP = self.OPT[self.CurMenu].size - 1;
}
self.Scroller elemMoveY(.2, (self.MenuOP * 22 - 150));
wait 0.2;
}
else if (self.inmenu == 1 && self.CurMenu != "MainMenu" && self meleeButtonPressed())
{
for (i = 0; i < self.Text.size; i++) self.Text[i] Destroy();
self NewMenu("MainMenu");
wait 0.2;
}
else if (self.inmenu == 1 && self.CurMenu == "MainMenu" && self meleeButtonPressed())
{
self.Background scale_over_time(.5, 0, 0);
self.Scroller elemMoveY(.5, -1000);
self.inmenu = 0;
self.Background.alpha = 0;
self.MenuOP = "nothing";
for (i = 0; i < self.Text.size; i++) self.Text[i] Destroy();
self freezecontrols(false);
wait 0.2;
}
else if (self.inmenu == 1 && self useButtonPressed())
{
if (!IsDefined(self.input[self.CurMenu][self.MenuOP])) self thread[[self.func[self.CurMenu][self.MenuOP]]]();
else self thread[[self.func[self.CurMenu][self.MenuOP]]](self.input[self.CurMenu][self.MenuOP]);
wait.2;
}
wait 0.0001;
}
}
createRectangle(align, relative, x, y, width, height, color, sort, alpha, shader)
{
barElemBG = newClientHudElem(self);
barElemBG.elemType = "bar";
if (!level.splitScreen) {
barElemBG.x = -2;
barElemBG.y = -2;
}
barElemBG.width = width;
barElemBG.height = height;
barElemBG.align = align;
barElemBG.relative = relative;
barElemBG.xOffset = 0;
barElemBG.yOffset = 0;
barElemBG.children = [];
barElemBG.sort = sort;
barElemBG.color = color;
barElemBG.alpha = alpha;
barElemBG setParent(level.uiParent);
barElemBG setShader(shader, width, height);
barElemBG.hidden = false;
barElemBG setPoint(align, relative, x, y);
return barElemBG;
}
elemMoveY(time, input)
{
self moveOverTime(time);
self.y = input;
}
Menu1(menuName, Num, OPTx, funcs, inputs)
{
self.OPT[menuName][Num] = OPTx;
self.func[menuName][Num] = funcs;
if (Isdefined(inputs)) self.input[menuName][Num] = inputs;
}
NewMenu(MenuNext)
{
self.curs = 0;
self.MenuOP = 0;
self.inmenu = 1;
self.CurMenu = MenuNext;
for (i = 0; i <= self.OPT[menuNext].size; i++) {
self.Text[i] Destroy();
self.Text[i] = createFontString("Default", 1.75, self);
self.Text[i] SetPoint("", "", 200, (i * 22) - 150);
self.Text[i] Settext(self.OPT[menuNext][i]);
self.Text[i].foreground = true;
self.Text[i].sort = 0;
self.Text[i].color = (0.611764705882353, 0.423529411764706, 1);
self.Scroller.y = self.Text[0].y;
wait 0.01;
}
}
SubMenu(MenuNext)
{
self.curs = 0;
self.inmenu = 1;
self.MenuOP = 0;
self.CurMenu = MenuNext;
for (i = 0; i < self.Text.size; i++)
{
self.Text[i] SetPoint("", "", 200, (i * 22) - 150);
self.Text[i] Settext(self.OPT[menuNext][i]);
self.Text[i].foreground = true;
self.Text[i].sort = 0;
self.Text[i].color = (0.611764705882353, 0.423529411764706, 1);
self.Scroller.y = self.Text[0].y;
wait 0.01;
}
}
elemMoveX(time, input)
{
self moveOverTime(time);
self.X = input;
}
Scale_over_time(Time, Width, Hieght)
{
self Scaleovertime(Time, Width, Hieght);
wait Time;
}
Test()
{
self iprintln("^1works");
}
Menu()
{
self Menu1("MainMenu", 0, "Menu 0", ::SubMenu, "Sub0");
self Menu1("MainMenu", 1, "Menu 1", ::SubMenu, "Sub1");
self Menu1("MainMenu", 2, "Menu 2", ::SubMenu, "Sub2");
self Menu1("MainMenu", 3, "Menu 3", ::SubMenu, "Sub3");
self Menu1("MainMenu", 4, "Menu 4", ::SubMenu, "Sub4");
self Menu1("MainMenu", 5, "Menu 5", ::SubMenu, "Sub5");
self Menu1("MainMenu", 6, "Menu 6", ::SubMenu, "Sub6");
self Menu1("MainMenu", 7, "Menu 7", ::SubMenu, "Sub7");
self Menu1("MainMenu", 8, "Menu 8", ::SubMenu, "Sub8");

self Menu1("Sub0", 0, "Sub", ::Test);
self Menu1("Sub0", 1, "Sub", ::Test);
self Menu1("Sub0", 2, "Sub", ::Test);
self Menu1("Sub0", 3, "Sub", ::Test);
self Menu1("Sub0", 4, "Sub", ::Test);
self Menu1("Sub0", 5, "Sub", ::Test);
self Menu1("Sub0", 6, "Sub", ::Test);
self Menu1("Sub0", 7, "Sub", ::Test);
self Menu1("Sub0", 8, "Sub", ::Test);

self Menu1("Sub1", 0, "Sub", ::Test);
self Menu1("Sub1", 1, "Sub", ::Test);
self Menu1("Sub1", 2, "Sub", ::Test);
self Menu1("Sub1", 3, "Sub", ::Test);
self Menu1("Sub1", 4, "Sub", ::Test);
self Menu1("Sub1", 5, "Sub", ::Test);
self Menu1("Sub1", 6, "Sub", ::Test);
self Menu1("Sub1", 7, "Sub", ::Test);
self Menu1("Sub1", 8, "Sub", ::Test);

self Menu1("Sub2", 0, "Sub", ::Test);
self Menu1("Sub2", 1, "Sub", ::Test);
self Menu1("Sub2", 2, "Sub", ::Test);
self Menu1("Sub2", 3, "Sub", ::Test);
self Menu1("Sub2", 4, "Sub", ::Test);
self Menu1("Sub2", 5, "Sub", ::Test);
self Menu1("Sub2", 6, "Sub", ::Test);
self Menu1("Sub2", 7, "Sub", ::Test);
self Menu1("Sub2", 8, "Sub", ::Test);

self Menu1("Sub3", 0, "Sub", ::Test);
self Menu1("Sub3", 1, "Sub", ::Test);
self Menu1("Sub3", 2, "Sub", ::Test);
self Menu1("Sub3", 3, "Sub", ::Test);
self Menu1("Sub3", 4, "Sub", ::Test);
self Menu1("Sub3", 5, "Sub", ::Test);
self Menu1("Sub3", 6, "Sub", ::Test);
self Menu1("Sub3", 7, "Sub", ::Test);
self Menu1("Sub3", 8, "Sub", ::Test);

self Menu1("Sub4", 0, "Sub", ::Test);
self Menu1("Sub4", 1, "Sub", ::Test);
self Menu1("Sub4", 2, "Sub", ::Test);
self Menu1("Sub4", 3, "Sub", ::Test);
self Menu1("Sub4", 4, "Sub", ::Test);
self Menu1("Sub4", 5, "Sub", ::Test);
self Menu1("Sub4", 6, "Sub", ::Test);
self Menu1("Sub4", 7, "Sub", ::Test);
self Menu1("Sub4", 8, "Sub", ::Test);

self Menu1("Sub5", 0, "Sub", ::Test);
self Menu1("Sub5", 1, "Sub", ::Test);
self Menu1("Sub5", 2, "Sub", ::Test);
self Menu1("Sub5", 3, "Sub", ::Test);
self Menu1("Sub5", 4, "Sub", ::Test);
self Menu1("Sub5", 5, "Sub", ::Test);
self Menu1("Sub5", 6, "Sub", ::Test);
self Menu1("Sub5", 7, "Sub", ::Test);
self Menu1("Sub5", 8, "Sub", ::Test);

self Menu1("Sub6", 0, "Sub", ::Test);
self Menu1("Sub6", 1, "Sub", ::Test);
self Menu1("Sub6", 2, "Sub", ::Test);
self Menu1("Sub6", 3, "Sub", ::Test);
self Menu1("Sub6", 4, "Sub", ::Test);
self Menu1("Sub6", 5, "Sub", ::Test);
self Menu1("Sub6", 6, "Sub", ::Test);
self Menu1("Sub6", 7, "Sub", ::Test);
self Menu1("Sub6", 8, "Sub", ::Test);

self Menu1("Sub7", 0, "Sub", ::Test);
self Menu1("Sub7", 1, "Sub", ::Test);
self Menu1("Sub7", 2, "Sub", ::Test);
self Menu1("Sub7", 3, "Sub", ::Test);
self Menu1("Sub7", 4, "Sub", ::Test);
self Menu1("Sub7", 5, "Sub", ::Test);
self Menu1("Sub7", 6, "Sub", ::Test);
self Menu1("Sub7", 7, "Sub", ::Test);
self Menu1("Sub7", 8, "Sub", ::Test);

self Menu1("Sub8", 0, "Sub", ::Test);
self Menu1("Sub8", 1, "Sub", ::Test);
self Menu1("Sub8", 2, "Sub", ::Test);
self Menu1("Sub8", 3, "Sub", ::Test);
self Menu1("Sub8", 4, "Sub", ::Test);
self Menu1("Sub8", 5, "Sub", ::Test);
self Menu1("Sub8", 6, "Sub", ::Test);
self Menu1("Sub8", 7, "Sub", ::Test);
self Menu1("Sub8", 8, "Sub", ::Test);
}
(adsbygoogle = window.adsbygoogle || []).push({});
06-18-2015, 12:19 AM #2
LegitGamer264
Vault dweller
Just put this into GSC studio, then click the "Check for Syntax Errors". It will tell you the line it's on. It's usually 1-3 lines off.
06-18-2015, 02:13 AM #3
Im_YouViolateMe
NextGenUpdate Elite
Originally posted by LegitGamer264 View Post
Just put this into GSC studio, then click the "Check for Syntax Errors". It will tell you the line it's on. It's usually 1-3 lines off.

The error is always 1 line above where GSC studio tells you it's at.

The following user thanked Im_YouViolateMe for this useful post:

LegitGamer264
06-18-2015, 03:08 AM #4
The Script error is with createFontString()
06-18-2015, 06:07 AM #5
T H C
Haxor!
Find this line, "self.Text = createFontString("Default", 1.75, self);" Replace it with "self.Text = createFontString("Default", 1.75);" without quotes.
06-18-2015, 03:00 PM #6
thanks guys, ill try this out Smile
06-19-2015, 05:20 AM #7
Exelo
Banned
Originally posted by YouViolateMe View Post
The error is always 1 line above where GSC studio tells you it's at.


Not Exactly, sometimes its tell you that there's a syntax error but doesn't tell you where.
Also, sometimes its doesn't tell you at all if there's a syntax error or not and just freeze the Windows Applications.

The following user thanked Exelo for this useful post:

Im_YouViolateMe
06-19-2015, 01:50 PM #8
Im_YouViolateMe
NextGenUpdate Elite
Originally posted by Exelo View Post
Not Exactly, sometimes its tell you that there's a syntax error but doesn't tell you where.
Also, sometimes its doesn't tell you at all if there's a syntax error or not and just freeze the Windows Applications.


True, but most of the time those errors are just misspelled words or unknown functions.
BTW did you check skype?

The following user thanked Im_YouViolateMe for this useful post:

Exelo

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo