Post: Syntax Error on Line 463: Just some help needed ;)
03-10-2013, 02:04 PM #1
Specter
Pro Memer
(adsbygoogle = window.adsbygoogle || []).push({}); Hey guys, I just need a little bit of help with this syntax error I keep getting on 463. I wouldn't have posted this if I didn't know the exact function where this error was.

This is line 463: if( self.curs < 0) self.curs = self.option[name].size-1;
which is in:

    runMenu(name, parent)
{
self endon("death");
self endon("exit_menu");
self endon("disconnect");

if( self.curs < 0) self.curs = self.option[name].size-1;

else if(self.curs>self.option[name].size-1) self.curs = 0;
self.menuOpen = 1;

while(self.menuOpen)
{
self.text = self createFontString("objective", 0.Cool Man (aka Tustin);
self.text setPoint("LEFT", "LEFT", 0, -165);
string = "";
for( i = 0;< self.option[name].size;i++ );
{
if(i == self.curs)
{
string += "^5"+self.option[name][i]+"/n";
self.shader moveOverTime(.25);
self.shader.y = i*20
self.text ChangeFontScaleOverTime( 0.7 );
self.text.fontScale = 1.5;

}
else
{
string+= "^7"+self.option[name][i]+"/n";
self.text ChangeFontScaleOverTime( 0.7 );
self.text.fontScale = 1.0;
}

}
self.text setText(string);
self thread destroyOn(self.text, "death", "update", "exit_menu");
self thread createText("objective", 1, "LEFT", "LEFT", 0, -190, self.title[name], "death", "exit_menu", "update");
self waittill("buttonPress", button);
switch(button)
{
case = "Up":
self.curs--;
if(self.curs<0) self.curse = self.option[name].size-1;
break;

case = "Down":
self.curs++;
if(self.curs>self.option[name].size-1) self.curs = 0;
break;

case = "A":
self thread [[self.function[name][self.curs]]](self.input[name][self.curs]);
self playsound( "elev_door_open" );
break;

case = "B":
if(self.subOpen)
{
self thread menuOpen(self.parent);
self playsound( "elev_door_close" );
}
else
{
self freezeControls(false);
self notify("exit_menu")
self playsound( "elev_door_close" );
self takeWeapon("killstreak_ac130_mp");
self giveweapon(self.OldWeapon);
self switchToWeapon(self.OldWeapon);
}
break;
}
self notify("update");
self.curs *= (self.curs>0)*(self.curs<self.option[name].size);
}
}


Here is a pic as well:
You must login or register to view this content.

Help is very appreciated, and credit will be given for a bug fix.
(adsbygoogle = window.adsbygoogle || []).push({});
03-13-2013, 10:50 PM #2
zertzHD
Bounty hunter
Lol remove the space between the parentheses and self
03-16-2013, 07:54 AM #3
zertzHD
Bounty hunter
Originally posted by NGU
Hey guys, I just need a little bit of help with this syntax error I keep getting on 463. I wouldn't have posted this if I didn't know the exact function where this error was.

This is line 463: if( self.curs < 0) self.curs = self.option[name].size-1;
which is in:

    runMenu(name, parent)
{
self endon("death");
self endon("exit_menu");
self endon("disconnect");

if( self.curs < 0) self.curs = self.option[name].size-1;

else if(self.curs>self.option[name].size-1) self.curs = 0;
self.menuOpen = 1;

while(self.menuOpen)
{
self.text = self createFontString("objective", 0.Cool Man (aka Tustin);
self.text setPoint("LEFT", "LEFT", 0, -165);
string = "";
for( i = 0;< self.option[name].size;i++ );
{
if(i == self.curs)
{
string += "^5"+self.option[name][i]+"/n";
self.shader moveOverTime(.25);
self.shader.y = i*20
self.text ChangeFontScaleOverTime( 0.7 );
self.text.fontScale = 1.5;

}
else
{
string+= "^7"+self.option[name][i]+"/n";
self.text ChangeFontScaleOverTime( 0.7 );
self.text.fontScale = 1.0;
}

}
self.text setText(string);
self thread destroyOn(self.text, "death", "update", "exit_menu");
self thread createText("objective", 1, "LEFT", "LEFT", 0, -190, self.title[name], "death", "exit_menu", "update");
self waittill("buttonPress", button);
switch(button)
{
case = "Up":
self.curs--;
if(self.curs<0) self.curse = self.option[name].size-1;
break;

case = "Down":
self.curs++;
if(self.curs>self.option[name].size-1) self.curs = 0;
break;

case = "A":
self thread [[self.function[name][self.curs]]](self.input[name][self.curs]);
self playsound( "elev_door_open" );
break;

case = "B":
if(self.subOpen)
{
self thread menuOpen(self.parent);
self playsound( "elev_door_close" );
}
else
{
self freezeControls(false);
self notify("exit_menu")
self playsound( "elev_door_close" );
self takeWeapon("killstreak_ac130_mp");
self giveweapon(self.OldWeapon);
self switchToWeapon(self.OldWeapon);
}
break;
}
self notify("update");
self.curs *= (self.curs>0)*(self.curs<self.option[name].size);
}
}


Here is a pic as well:
You must login or register to view this content.

Help is very appreciated, and credit will be given for a bug fix.


^ look above at my other post
04-21-2013, 07:17 PM #4
zertzHD
Bounty hunter
dumb ass its such an easy fix ur shit at coding and cant code

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo