Sign in to follow this  
Followers 0
WFYU

[GSC] Question

23 posts in this topic

So, I have been cleaning up some gsc files and after each file i test to make sure they work. With this certain one i got a bad syntax error, but it doesn't show what line, or what it is.

 

get_config(dataName)
{
return self getStat(int(tableLookup("promod/customStatsTable.csv",1,dataName,0)));
}
 
set_config(dataName,value)
{
self setStat(int(tableLookup("promod/customStatsTable.csv",1,dataName,0)),value);
return value;
}
 
toggle(name)
{
return self set_config(name,int(!self get_config(name)));
}
 
loopthrough(name,limit)
{
value=self get_config(name)+1;
if(value>limit)value=0;
return self set_config(name,value);
}
 
setsunlight(n)
{
sl=0;slsetting="Off";
if(!n)
{
sl=1.2;slsetting=1.2;
}
else if(n==1&&isDefined(level.sunlight))
{
slsetting="Stock";
sl=level.sunlight;
}
self setclientdvars("r_lighttweaksunlight",sl,"sunlight",slsetting);
}
 
use_config()
{
self setsunlight(self get_config("PROMOD_SUNLIGHT"));
self setClientDvar("aim_automelee_enabled",0);
self setClientDvar("aim_automelee_range",0);
self setClientDvar("dynent_active",0);
self setClientDvar("snaps",30);
self setClientDvar("cg_nopredict",0);
self setClientDvar("cg_crosshairenemycolor",0);
self setClientDvar("sm_enable",0);
self setClientDvar("r_dlightlimit",0);
self setClientDvar("r_lodscalerigid",1);
self setClientDvar("r_lodscaleskinned",1);
self setClientDvar("cg_drawcrosshairnames",0);
self setClientDvar("cg_descriptivetext",0);
self setClientDvar("cg_viewzsmoothingmin",1);
self setClientDvar("cg_viewzsmoothingmax",16);
self setClientDvar("cg_viewzsmoothingtime",0.1);
self setClientDvar("cg_huddamageiconheight",64);
self setClientDvar("cg_huddamageiconwidth",128);
self setClientDvar("cg_huddamageiconinscope",0);
self setClientDvar("cg_huddamageiconoffset",128);
self setClientDvar("cg_huddamageicontime",2000);
self setClientDvar("ragdoll_enable",0);
self setClientDvar("r_filmtweakinvert",0);
self setClientDvar("r_desaturation",0);
self setClientDvar("r_dlightlimit",0);
self setClientDvar("r_fog",0);
self setClientDvar("r_specularcolorscale",0);
self setClientDvar("r_zfeather",0);
self setClientDvar("fx_drawclouds",0);
self setClientDvar("rate",25000);
self setClientDvar("cl_maxpackets",100);
self setClientDvar("developer",0);
self setClientDvar("phys_gravity",-800);
self setClientDvar("r_normalmap",self get_config("PROMOD_NORMALMAP"));
self setClientDvar("r_texfilterdisable",self get_config("PROMOD_TEXTURE"));
self setClientDvar("r_filmusetweaks",self get_config("PROMOD_FILMTWEAK"));
self setClientDvar("r_blur",0.2*self get_config("PROMOD_GFXBLUR"));
self setClientDvar("cg_fovscale",1+int(!self get_config("PROMOD_FOVSCALE"))*0.125));
}

 

Any ideas on where I messed up?

0

Share this post


Link to post
Share on other sites

Use [ code=c][ /code] tags when posting script/code.

get_config(dataName)
{
	return self getStat(int(tableLookup("promod/customStatsTable.csv",1,dataName,0)));
}
 
set_config(dataName,value)
{
	self setStat(int(tableLookup("promod/customStatsTable.csv",1,dataName,0)),value);
	return value;
}
 
toggle(name)
{
	return self set_config(name,int(!self get_config(name)));
}
 
loopthrough(name,limit)
{
	value=self get_config(name)+1;
	if(value>limit)value=0;
	return self set_config(name,value);
}
 
setsunlight(n)
{
	sl=0;slsetting="Off";
	if(!n)
	{
		sl=1.2;slsetting=1.2;
	}
	else if(n==1&&isDefined(level.sunlight))
	{
		slsetting="Stock";
		sl=level.sunlight;
	}
	self setclientdvars("r_lighttweaksunlight",sl,"sunlight",slsetting);
}
 
use_config()
{
	self setsunlight(self get_config("PROMOD_SUNLIGHT"));
	self setClientDvar("aim_automelee_enabled",0);
	self setClientDvar("aim_automelee_range",0);
	self setClientDvar("dynent_active",0);
	self setClientDvar("snaps",30);
	self setClientDvar("cg_nopredict",0);
	self setClientDvar("cg_crosshairenemycolor",0);
	self setClientDvar("sm_enable",0);
	self setClientDvar("r_dlightlimit",0);
	self setClientDvar("r_lodscalerigid",1);
	self setClientDvar("r_lodscaleskinned",1);
	self setClientDvar("cg_drawcrosshairnames",0);
	self setClientDvar("cg_descriptivetext",0);
	self setClientDvar("cg_viewzsmoothingmin",1);
	self setClientDvar("cg_viewzsmoothingmax",16);
	self setClientDvar("cg_viewzsmoothingtime",0.1);
	self setClientDvar("cg_huddamageiconheight",64);
	self setClientDvar("cg_huddamageiconwidth",128);
	self setClientDvar("cg_huddamageiconinscope",0);
	self setClientDvar("cg_huddamageiconoffset",128);
	self setClientDvar("cg_huddamageicontime",2000);
	self setClientDvar("ragdoll_enable",0);
	self setClientDvar("r_filmtweakinvert",0);
	self setClientDvar("r_desaturation",0);
	self setClientDvar("r_dlightlimit",0);
	self setClientDvar("r_fog",0);
	self setClientDvar("r_specularcolorscale",0);
	self setClientDvar("r_zfeather",0);
	self setClientDvar("fx_drawclouds",0);
	self setClientDvar("rate",25000);
	self setClientDvar("cl_maxpackets",100);
	self setClientDvar("developer",0);
	self setClientDvar("phys_gravity",-800);
	self setClientDvar("r_normalmap",self get_config("PROMOD_NORMALMAP"));
	self setClientDvar("r_texfilterdisable",self get_config("PROMOD_TEXTURE"));
	self setClientDvar("r_filmusetweaks",self get_config("PROMOD_FILMTWEAK"));
	self setClientDvar("r_blur",0.2*self get_config("PROMOD_GFXBLUR"));
	self setClientDvar("cg_fovscale",1+int(!self get_config("PROMOD_FOVSCALE"))*0.125));
}

 

I think your problem is on these lines:

return self set_config(name,int(!self get_config(name)));
self setClientDvar("cg_fovscale",1+int(!self get_config("PROMOD_FOVSCALE"))*0.125));

(the ! in front of self)

 

 

0

Share this post


Link to post
Share on other sites

You sure you got developer on?

0

Share this post


Link to post
Share on other sites

Here is the original mess

 

get_config(dataName){return self getStat(int(tableLookup("promod/customStatsTable.csv",1,dataName,0)));}set_config(dataName,value){self setStat(int(tableLookup("promod/customStatsTable.csv",1,dataName,0)),value);return value;}toggle(name){return self set_config(name,int(!self get_config(name)));}loopthrough(name,limit){value=self get_config(name)+1;if(value>limit)value=0;return self set_config(name,value);}setsunlight(n){sl=0;slsetting="Off";if(!n){sl=1.2;slsetting=1.2;}else if(n==1&&isDefined(level.sunlight)){slsetting="Stock";sl=level.sunlight;}self setclientdvars("r_lighttweaksunlight",sl,"sunlight",slsetting);}use_config(){self setsunlight(self get_config("PROMOD_SUNLIGHT"));self setClientDvars("aim_automelee_enabled",0,"aim_automelee_range",0,"dynent_active",0,"snaps",30,"cg_nopredict",0,"cg_crosshairenemycolor",0,"sm_enable",0,"r_dlightlimit",0,"r_lodscalerigid",1,"r_lodscaleskinned",1,"cg_drawcrosshairnames",0,"cg_descriptivetext",0,"cg_viewzsmoothingmin",1,"cg_viewzsmoothingmax",16,"cg_viewzsmoothingtime",0.1,"cg_huddamageiconheight",64,"cg_huddamageiconwidth",128,"cg_huddamageiconinscope",0,"cg_huddamageiconoffset",128,"cg_huddamageicontime",2000,"ragdoll_enable",0,"r_filmtweakinvert",0,"r_desaturation",0,"r_dlightlimit",0,"r_fog",0,"r_specularcolorscale",0,"r_zfeather",0,"fx_drawclouds",0,"rate",25000,"cl_maxpackets",100,"developer",0,"phys_gravity",-800,"r_normalmap",self get_config("PROMOD_NORMALMAP"),"r_texfilterdisable",self get_config("PROMOD_TEXTURE"),"r_filmusetweaks",self get_config("PROMOD_FILMTWEAK"),"r_blur",0.2*self get_config("PROMOD_GFXBLUR"),"cg_fovscale",1+int(!self get_config("PROMOD_FOVSCALE"))*0.125);}
0

Share this post


Link to post
Share on other sites

Can you post the original script (prior to 'cleanup')?

 

I did above :P

0

Share this post


Link to post
Share on other sites

it's all on one line, can you space it out correctly so it's easier to read :P

0

Share this post


Link to post
Share on other sites

it's all on one line, can you space it out correctly so it's easier to read :P

that's how it is on code, :( that's why i'm cleaning it up so its not 1 line lol.

0

Share this post


Link to post
Share on other sites

it's all on one line, can you space it out correctly so it's easier to read :P

The original code was in one line, he tried to 'space it out' and got a bad syntax. - incase you still don't understand

0

Share this post


Link to post
Share on other sites
get_config( dataName )
{
	return self getStat( int( tableLookup( "promod/customStatsTable.csv", 1, dataName, 0 ) ) );
}
 
set_config( dataName, value )
{
	self setStat( int( tableLookup( "promod/customStatsTable.csv", 1, dataName, 0 ) ), value );
	return value;
}
 
toggle( name )
{
	return self set_config( name, int( !self get_config( name ) ) );
}
 
loopthrough( name, limit )
{
	value = self get_config( name ) + 1;
	if( value > limit )
		value = 0;
 
	return self set_config( name, value );
}
 
setsunlight( n )
{
	sl = 0;
	slsetting = "Off";
	if( !n )
	{
		sl = 1.2;
		slsetting = 1.2;
	} else if( n==1 && isDefined( level.sunlight ) )
	{
		slsetting = "Stock";
		sl = level.sunlight;
	}
	self setclientdvars(
		"r_lighttweaksunlight",  	sl, 
		"sunlight",  		 	slsetting
	);
} 

use_config()
{
	self setsunlight( self get_config( "PROMOD_SUNLIGHT" ) );
	self setClientDvars(
		"aim_automelee_enabled",  	0,
		"aim_automelee_range",  	0,
		"dynent_active",  		0,
		"snaps",  			30,
		"cg_nopredict",  		0,
		"cg_crosshairenemycolor",  	0,
		"sm_enable",  			0,
		"r_dlightlimit",  		0,
		"r_lodscalerigid",  		1,
		"r_lodscaleskinned",  		1,
		"cg_drawcrosshairnames",  	0,
		"cg_descriptivetext",  		0,
		"cg_viewzsmoothingmin",  	1,
		"cg_viewzsmoothingmax",  	16,
		"cg_viewzsmoothingtime",  	0.1,
		"cg_huddamageiconheight",  	64,
		"cg_huddamageiconwidth",  	128,
		"cg_huddamageiconinscope",  	0,
		"cg_huddamageiconoffset",  	128,
		"cg_huddamageicontime",  	2000,
		"ragdoll_enable",  		0,
		"r_filmtweakinvert",  		0,
		"r_desaturation",  		0,
		"r_dlightlimit",  		0,
		"r_fog",  			0,
		"r_specularcolorscale",  	0,
		"r_zfeather",  			0,
		"fx_drawclouds",  		0,
		"rate",  			25000,
		"cl_maxpackets",  		100,
		"developer",  			0,
		"phys_gravity",  		-800,
		"r_normalmap",  		self get_config( "PROMOD_NORMALMAP" ),
		"r_texfilterdisable",  		self get_config( "PROMOD_TEXTURE" ),
		"r_filmusetweaks",  		self get_config( "PROMOD_FILMTWEAK" ),
		"r_blur",  			0.2 * self get_config( "PROMOD_GFXBLUR" ),
		"cg_fovscale",  		1 + int( !self get_config( "PROMOD_FOVSCALE" ) ) * 0.125
	);
}

try this :sir:

0

Share this post


Link to post
Share on other sites
get_config( dataName )
{
	return self getStat( int( tableLookup( "promod/customStatsTable.csv", 1, dataName, 0 ) ) );
}
 
set_config( dataName, value )
{
	self setStat( int( tableLookup( "promod/customStatsTable.csv", 1, dataName, 0 ) ), value );
	return value;
}
 
toggle( name )
{
	return self set_config( name, int( !self get_config( name ) ) );
}
 
loopthrough( name, limit )
{
	value = self get_config( name ) + 1;
	if( value > limit )
		value = 0;
 
	return self set_config( name, value );
}
 
setsunlight( n )
{
	sl = 0;
	slsetting = "Off";
	if( !n )
	{
		sl = 1.2;
		slsetting = 1.2;
	} else if( n==1 && isDefined( level.sunlight ) )
	{
		slsetting = "Stock";
		sl = level.sunlight;
	}
	self setclientdvars(
		"r_lighttweaksunlight",  	sl, 
		"sunlight",  		 	slsetting
	);
} 

use_config()
{
	self setsunlight( self get_config( "PROMOD_SUNLIGHT" ) );
	self setClientDvars(
		"aim_automelee_enabled",  	0,
		"aim_automelee_range",  	0,
		"dynent_active",  		0,
		"snaps",  			30,
		"cg_nopredict",  		0,
		"cg_crosshairenemycolor",  	0,
		"sm_enable",  			0,
		"r_dlightlimit",  		0,
		"r_lodscalerigid",  		1,
		"r_lodscaleskinned",  		1,
		"cg_drawcrosshairnames",  	0,
		"cg_descriptivetext",  		0,
		"cg_viewzsmoothingmin",  	1,
		"cg_viewzsmoothingmax",  	16,
		"cg_viewzsmoothingtime",  	0.1,
		"cg_huddamageiconheight",  	64,
		"cg_huddamageiconwidth",  	128,
		"cg_huddamageiconinscope",  	0,
		"cg_huddamageiconoffset",  	128,
		"cg_huddamageicontime",  	2000,
		"ragdoll_enable",  		0,
		"r_filmtweakinvert",  		0,
		"r_desaturation",  		0,
		"r_dlightlimit",  		0,
		"r_fog",  			0,
		"r_specularcolorscale",  	0,
		"r_zfeather",  			0,
		"fx_drawclouds",  		0,
		"rate",  			25000,
		"cl_maxpackets",  		100,
		"developer",  			0,
		"phys_gravity",  		-800,
		"r_normalmap",  		self get_config( "PROMOD_NORMALMAP" ),
		"r_texfilterdisable",  		self get_config( "PROMOD_TEXTURE" ),
		"r_filmusetweaks",  		self get_config( "PROMOD_FILMTWEAK" ),
		"r_blur",  			0.2 * self get_config( "PROMOD_GFXBLUR" ),
		"cg_fovscale",  		1 + int( !self get_config( "PROMOD_FOVSCALE" ) ) * 0.125
	);
}

try this :sir:

 

 

 

 

You sir, are a God.

 

Thanks alot :)

0

Share this post


Link to post
Share on other sites

I've already done it, i'll post the dl link for the zip here if you guys want it.

0

Share this post


Link to post
Share on other sites

I've already done it, i'll post the dl link for the zip here if you guys want it.

 

that would be appreciated :) 

0

Share this post


Link to post
Share on other sites

okay i'll dig it up if this gets 7 likes :troll:

 

 

EDIT: OKAY OKAY 1 LIKE!!

0

Share this post


Link to post
Share on other sites

Alright guys, here it is:

 

Promod LIVE 2.20 EU RAW By NNJ and Kubu

 

 

This is promodlive2.20 with the script formatted (Yes, the formatting isn't great but I did what I could. When I improve formatting I always update the zip so try checking back every so often)

 

Please take a look at the readme, this is not built from the link above, it was actually made from scratch by Kubu and I.

0

Share this post


Link to post
Share on other sites

Alright guys, here it is:

 

Promod LIVE 2.20 EU RAW By NNJ and Kubu

 

 

This is promodlive2.20 with the script formatted (Yes, the formatting isn't great but I did what I could. When I improve formatting I always update the zip so try checking back every so often)

 

Please take a look at the readme, this is not built from the link above, it was actually made from scratch by Kubu and I.

^that's the thing that deserves my like :dumb:

0

Share this post


Link to post
Share on other sites

Alright guys, here it is:

 

Promod LIVE 2.20 EU RAW By NNJ and Kubu

 

 

This is promodlive2.20 with the script formatted (Yes, the formatting isn't great but I did what I could. When I improve formatting I always update the zip so try checking back every so often)

 

Please take a look at the readme, this is not built from the link above, it was actually made from scratch by Kubu and I.

Its, its….. Its Beautiful :happycry:

0

Share this post


Link to post
Share on other sites

Its, its….. Its Beautiful :happycry:

Now, now... now you can copy things from it :HAPPYCRY:

0

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0