View previous topic :: View next topic |
Author |
Message |
dadajszen Cheater
Reputation: 0
Joined: 19 Sep 2013 Posts: 27
|
Posted: Sat Aug 15, 2015 9:16 am Post subject: [HELP] C# - Trainer |
|
|
Hi i have this code:
Code: | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using FarCry3Trainer.CheatEngine;
namespace SaperTrainerV43._0
{
class Program
{
static void Main(string[] args)
{
Process[] processes = Process.GetProcessesByName("minesweeper");
if (processes.Length > 0)
using (CheatEngine.Memory memory = new CheatEngine.Memory(processes[0]))
{
CheatEngine.ProcessAddress address =
memory.GetAdress("minesweeper.exe@AAA38@120");
Console.WriteLine("Current cash: {0}", memory.ReadUInt32(address));
Console.WriteLine("Enter new cash: ");
uint newCash = uint.Parse(Console.ReadLine());
memory.WriteUInt32(address, newCash);
}
}
}
} |
Its my library: Address memory win32
And i have 3 errors:
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sat Aug 15, 2015 9:50 am Post subject: |
|
|
Put "FarCry3Trainer." in front of CheatEngine
or "using FarCry3Trainer;" at the top
or better yet, remove "FarCry3Trainer." from the namespace in the other files
|
|
Back to top |
|
 |
dadajszen Cheater
Reputation: 0
Joined: 19 Sep 2013 Posts: 27
|
Posted: Sat Aug 15, 2015 10:06 am Post subject: |
|
|
Now i have 2 errors:
Did you have maybe address.cs ?
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sat Aug 15, 2015 10:25 am Post subject: |
|
|
I think "CheatEngine.ProcessAddress" should be "IntPtr"
And "GetAdress" should be "GetAddress" (type better!)
|
|
Back to top |
|
 |
dadajszen Cheater
Reputation: 0
Joined: 19 Sep 2013 Posts: 27
|
Posted: Sat Aug 15, 2015 10:48 am Post subject: |
|
|
Ok its my code:
And my bug:
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sat Aug 15, 2015 11:14 am Post subject: |
|
|
I'm not sure if your GetAddress string is correct or not.
Try something simple, like just "minesweeper.exe".
Judging by your functions, nothing recognizes '@' as anything.
Did you mean for those to be '+'?
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sat Aug 15, 2015 6:15 pm Post subject: |
|
|
All of these errors are things you would understand if you didn't just copy paste a trainer library and call it your own code.
Rather then just copy/pasting things together, take the time to learn the language first before you jump into game hacking.
_________________
- Retired. |
|
Back to top |
|
 |
|