Results 1 to 6 of 6
  1. #1
    Clxrk's Avatar
    Join Date
    May 2016
    Gender
    male
    Location
    127.0.01
    Posts
    34
    Reputation
    10
    Thanks
    20

    Unhappy "The name 'ReadInteger' does not exist in the current context"

    Hey people,

    I am fairly new to C# and yeah I am making my own tool for MW3 atm.
    So I didn't work on it for a few weeks now, since I am busy at school at the moment and just enjoying life.

    I know for a fact that it used to work properly in the past (Built it and gave it to my friends, but a previous version).

    Now I don't really remember where I left but all those functions just don't work anymore.

    • The name 'WriteInteger' does not exist in the current context
    • The name 'ReadInteger' does not exist in the current context
    • The name 'ProcessHandle' does not exist in the current context
    • The name 'WriteBytes does not exist in the current context


    I really have no idea to fix it.
    Could any of you help m with that?


  2. #2
    Biesi's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    4,993
    Reputation
    374
    Thanks
    8,823
    My Mood
    Twisted
    Looks like your project file is messed up or you've lost some source files

  3. #3
    Clxrk's Avatar
    Join Date
    May 2016
    Gender
    male
    Location
    127.0.01
    Posts
    34
    Reputation
    10
    Thanks
    20
    How though? It makes no sense since I didn't change anything at all.

  4. #4
    Sammy's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Location
    Vaero
    Posts
    1,098
    Reputation
    224
    Thanks
    228
    Quote Originally Posted by Biesi View Post
    Looks like your project file is messed up or you've lost some source files
    Quote Originally Posted by Clxrk View Post
    How though? It makes no sense since I didn't change anything at all.
    I don't think we can answer how you lost files.

    Maybe you need to add a library? You should check if there's a livrary that uses those specific functions.

  5. #5
    twas brillig's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Location
    Southeastern USA
    Posts
    54
    Reputation
    10
    Thanks
    77
    My Mood
    Amused
    If you can send me the Visual Studio project in a ZIP or RAR, I'll fix it for you.

    In the class that you showed us, does WriteInteger, ReadInteger, ProcessHandle and WriteBytes all live in the same class? If it is in a different class or file, you'll need to reference that class/file. It's always a good idea to separate your "working code" from your user interface code. The GUI runs on one thread and if your "working code" happens to run on the same thread, the GUI will become unresponsive and the user will think it's crashed. You can remedy this using a BackgroundWorker, Threading, etc. The way that I use the functions in another class is by instantiating it in my GUI code such as:
    Code:
    using System.Threading.Tasks;
    using System.Windows.Forms;
    
    namespace YourNamespace 
    {
    	public partial class UserInterface : Form1
    	{
    		// Instantiates the HackFunctions class where all your functions live. Now you can use it in your code.
                    HackFunctions hacks = new HackFunctions();
    		
    		public UserInterface() 
    		{
    			private void checkBox1_CheckedChanged(object sender, EventArgs e)
    			{
                                    // If the selected process is correct and the checkbox is checked, continue.
    				if (hacks.Process_Handle("iw5mp") && checkBox1.Checked == true)
    					hacks.WriteInteger(OFFS_FB, 4);
    				else
    					WriteInteger(OFFS_FB, 9);
    			}
    		}
    	}
    }
    Tips: Back when I started programming I learned from the same mistake you're making. Always document your code. One time, I got up and went to get some lunch and came back and had NO idea what I wrote. This is an example of something I wrote recently, I comment on everything.

    Code:
    // This method performs the actual installation of the mods to the target directory. It is essentially just copying the mods the user selects to the target directory.
            private static void CopyAllDirectories(DirectoryInfo source, DirectoryInfo target)
            {
                // Checks if directory exists.
                Directory.CreateDirectory(target.FullName);
    
                // Copy each file into the new directory.
                foreach (FileInfo file in source.GetFiles())
                {
                    file.CopyTo(Path.Combine(target.FullName, file.Name), true);
                    Console.WriteLine(@"Copying {0}\{1}", target.FullName, file.Name);    // For debugging purposes.
                }
    
                // Copy each subdirectory using recursion.
                foreach (DirectoryInfo diSourceSubDir in source.GetDirectories())
                {
                    DirectoryInfo nextTargetSubDir =
                        target.CreateSubdirectory(diSourceSubDir.Name);
                    CopyAllDirectories(diSourceSubDir, nextTargetSubDir);
                }
    }
    Last edited by twas brillig; 06-13-2016 at 08:33 AM.
    Software Developer, Educator, and Gamer.

  6. #6
    _NightWare's Avatar
    Join Date
    Feb 2016
    Gender
    male
    Location
    Netherlands
    Posts
    724
    Reputation
    274
    Thanks
    2,305
    My Mood
    Inspired
    Looks like you're missing a class wich includes those methods.

    Feel free to leave a thanks or +rep if I helped you.

    ಠ_ರೃ
    Script Squad






    [IMG]https://roblo*****m?rbxp=135887430[/IMG]

Similar Threads

  1. AS3 Source "The key container name 'connector net' does not exist" Error Fix
    By ClarkusReloaded in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 6
    Last Post: 03-08-2015, 06:38 AM
  2. [Help Request] The name 'int' does not exist in the current context
    By a9x9x69 in forum C# Programming
    Replies: 1
    Last Post: 05-27-2012, 05:04 PM
  3. The canadian hack does not work
    By HaCkErR-pRo in forum Combat Arms Hacks & Cheats
    Replies: 8
    Last Post: 04-23-2009, 03:55 PM
  4. Replies: 25
    Last Post: 01-09-2009, 01:29 AM
  5. the hack does not work in the ca eu
    By Massimo1993 in forum Combat Arms Hacks & Cheats
    Replies: 2
    Last Post: 12-23-2008, 05:20 AM

Tags for this Thread