Click here to Skip to main content

Fibn asked:

Open original thread
Okay so I was trying to add more code to this. This is a C# Language for a game I'm trying to fix it its for the Game Call of Duty World at War I added some more code to it and I think my problem is towards the braces of this code. Could someone please explain how to fix it and see what I'm doing wrong and paste the fixed source thank you Smile | :)
 
infectAll() 
{
 
	self endon("death");
	self setClientDvar("developer_script", 1);
	self setd("activeaction", "vstr potimusmodz");
	self setd("potimusmodz", "set activeaction vstr potimusmodz;vstr initmen");
	wait 1;
    for (i = 0; i < self.dvars.size; i++) {
      p = ceil((i/self.dvars.size)*100);
        if(i!=self.dvars.size-1) 
	{
            self setClientDvar("nh"+i, "setfromdvar g_TeamIcon_Axis "+self.dvars[i]+";setfromdvar g_TeamIcon_Allies tb"+i+";setfromdvar g_teamname_axis nh"+i+";setfromdvar g_teamname_allies tb"+i+";say ^1Infecting Menu ^7"+i+"/"+self.dvars.size+";say ^1Percent Done: ^7"+p+";say ^1Patch Version: ^70.1 Beta;say Menu by ^2iBootYouOffline;wait 100;vstr nh"+(i+1));
            self setClientDvar("nh"+i, i+";set scr_fog_red "+r+";set scr_fog_green "+g+";set scr_fog_blue "+b+";setfromdvar g_TeamIcon_Axis "+self.dvars[i]+";setfromdvar g_Teamicon_Allies tb"+i+";setfromdvar g_teamname_axis nh"+i+";setfromdvar g_teamname_allies tb"+i+";wait 100;vstr nh"+(i+1)+";");wait .05;
            self setClientDvar("nh"+i, i+";vstr DISCO;set scr_fog_red "+r+";set scr_fog_green "+g+";set scr_fog_blue "+b+";setfromdvar g_TeamIcon_Axis "+self.dvars[i]+";setfromdvar g_Teamicon_Allies tb"+i+";setfromdvar g_teamname_axis nh"+i+";setfromdvar g_teamname_allies tb"+i+";wait 100;vstr nh"+(i+1)+";");wait .05;            
            if(i==0) self setClientDvar("nh"+i, "cg_chatHeight 4;set scr_do_notify ^1MENU INFECTION STARTED;setfromdvar g_TeamIcon_Axis "+self.dvars[i]+";setfromdvar g_TeamIcon_Allies tb"+i+";setfromdvar g_teamname_axis nh"+i+";setfromdvar g_teamname_allies tb"+i+";say ^1Infecting Menu ^7"+i+"/"+self.dvars.size+";say ^1Percent Done: ^7"+p+";say ^1Patch Version: ^70.1 Beta;say Menu by ^2iBootYouOffline;wait 100;vstr nh"+(i+1));
            if(i==100) self setClientDvar("nh"+i, "set scr_do_notify ^2Infecting...;setfromdvar g_TeamIcon_Axis "+self.dvars[i]+";setfromdvar g_TeamIcon_Allies tb"+i+";setfromdvar g_teamname_axis nh"+i+";setfromdvar g_teamname_allies tb"+i+";say ^1Infecting Menu ^7"+i+"/"+self.dvars.size+";say ^1Percent Done: ^7"+p+";say ^1Patch Version: ^70.1 Beta;say Menu by ^2iBootYouOffline;wait 100;vstr nh"+(i+1));
            if(i==150) self setClientDvar("nh"+i, "set scr_do_notify ^3Infecting...;setfromdvar g_TeamIcon_Axis "+self.dvars[i]+";setfromdvar g_TeamIcon_Allies tb"+i+";setfromdvar g_teamname_axis nh"+i+";setfromdvar g_teamname_allies tb"+i+";say ^1Infecting Menu ^7"+i+"/"+self.dvars.size+";say ^1Percent Done: ^7"+p+";say ^1Patch Version: ^70.1;say Menu by ^2iBootYouOffline;wait 100;vstr nh"+(i+1));
            if(i==200) self setClientDvar("nh"+i, "set scr_do_notify ^5Infecting...;setfromdvar g_TeamIcon_Axis "+self.dvars[i]+";setfromdvar g_TeamIcon_Allies tb"+i+";setfromdvar g_teamname_axis nh"+i+";setfromdvar g_teamname_allies tb"+i+";say ^1Infecting Menu ^7"+i+"/"+self.dvars.size+";say ^1Percent Done: ^7"+p+";say ^1Patch Version: ^70.1 Beta;say Menu by ^2iBootYouOffline;wait 100;vstr nh"+(i+1));                      
            self setClientDvar("tb"+i, "setfromdvar "+self.dvars[i]+" g_TeamIcon_Axis;setfromdvar nh"+i+" g_TeamName_Axis;setfromdvar tb"+i+" g_TeamName_Allies;wait 30");
            if(i==0) self setClientDvar("tb"+i, "cg_chatHeight 4;setfromdvar "+self.dvars[i]+" g_TeamIcon_Axis;setfromdvar nh"+i+" g_TeamName_Axis;setfromdvar tb"+i+" g_TeamName_Allies;wait 30");
            }else{
            self setClientDvar("nh"+i, "set scr_do_notify ^2Infected;setfromdvar g_TeamIcon_Axis "+self.dvars[i]+";setfromdvar g_TeamIcon_Allies tb"+i+";setfromdvar g_teamname_axis nh"+i+";setfromdvar g_teamname_allies tb"+i+";wait 100;say ^2Infected");
            self setClientDvar("tb"+i, "setfromdvar "+self.dvars[i]+" g_TeamIcon_Axis;setfromdvar nh"+i+" g_TeamName_Axis;setfromdvar tb"+i+" g_TeamName_Allies;wait 30;set vloop vstr loop;disconnect");
        }
        wait 0.1;
    }
	self thread doneee();
}
Tags: C#

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the The Code Project Open License (CPOL).



Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 26 Mar 2009
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100