Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
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();
}
Posted 5-Nov-12 12:53pm
Fibn302
Edited 5-Nov-12 12:56pm
v2
Comments
Sergey Alexandrovich Kryukov at 6-Nov-12 0:43am
   
Why doing so? No, it does not look as a productive approach; and, to me, the code is too bad and cryptic to waste time on it. You did not even tells us what language is that (no, not C#).
--SA
Fibn at 8-Nov-12 18:18pm
   
It is C# World at War coding is in C#...
Sergey Alexandrovich Kryukov at 8-Nov-12 18:23pm
   
It says, for example: "self thread doneee()". No, this is not C#, not even close.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 459
1 Maciej Los 404
2 Sergey Alexandrovich Kryukov 192
3 CPallini 185
4 Hard_Rockz 115
0 OriginalGriff 5,634
1 Sergey Alexandrovich Kryukov 4,763
2 Peter Leow 2,954
3 Maciej Los 2,614
4 DamithSL 2,465


Advertise | Privacy | Mobile
Web04 | 2.8.140718.1 | Last Updated 5 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid