Hello,
Well I got a new computer for Christmas, and I installed C# today
Before Christmas my program used to work, Now I have installed C# again...
And I get the error:
Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
I don't know know to fix it...
Heres my code:
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Magic;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void updatebtn_Click(object sender, EventArgs e)
{
// Open BlackMagic and hook!
BlackMagic WoW = new BlackMagic(); // Start BlackMagic under the name WoW
WoW.OpenProcessAndThread(SProcess.GetProcessFromProcessName("Wow.exe")); // Hook the first WoW process it finds
// Read Player base
uint Pbase = WoW.ReadUInt(WoW.ReadUInt(WoW.ReadUInt(0x00CF7C00) + 0x34) + 0x24); // Reads Player Base
// Read Players name
string Name = WoW.ReadASCIIString(0x00C923F8, 12); // Reads player name
namelabel.Text = "Player name: " + Name; // Sets players name label
// Read player health
uint CurHealth = WoW.ReadUInt(WoW.ReadUInt(Pbase + 0x8) + (0x17 *4)); // Reads players current health
uint MaxHealth = WoW.ReadUInt(WoW.ReadUInt(Pbase + 0x8) + (0x1F * 4)); // Reads players max health
int HPpercent = (int)(((double)CurHealth / (double)MaxHealth) * 100); // Work out Health percent
HPprogressBar.Value = HPpercent; // Sets percent of health to progress bar
// Read player mana
uint CurMana = WoW.ReadUInt(WoW.ReadUInt(Pbase + 0x8) + (0x18 * 4)); // Reads players current mana
uint MaxMana = WoW.ReadUInt(WoW.ReadUInt(Pbase + 0x8) + (0x20 * 4)); // Reads players max mana
int ManaPercent = (int)(((double)CurMana / (double)MaxMana) * 100); // Work out Mana percent
if (MaxMana == 0) // If MaxMana is 0 then we dont use mana
MessageBox.Show("No Mana found"); //Show message box that says "No Mana found"
else //Else means is MaxMana isnt 0 then carry on
ManaprogressBar.Value = ManaPercent; // Sets percent of mana to progress bar
// Read players level
uint Level = WoW.ReadUInt(WoW.ReadUInt(Pbase + 0x8) + (0x35 * 4)); // Reads players level
levellabel.Text = "Player level: " + Level; // Sets players level label
// Read player coords
float playerx = WoW.ReadFloat(Pbase + 0x798); // Read players xlocation
float playery = WoW.ReadFloat(Pbase + 0x79C); // Read players ylocation
float playerz = WoW.ReadFloat(Pbase + 0x7A0); // Read players zlocation
xlabel.Text = "Player xpos: " + playerx; // Sets players xlocation label
ylabel.Text = "Player ypos: " + playery; // Sets players ylocation label
zlabel.Text = "Player zpos: " + playerz; // Sets players zlocation label
string AreaName = WoW.ReadASCIIString(WoW.ReadUInt(0xB6854C), 100); // Reads minimap text
MessageBox.Show(AreaName);
//Click to move test
// WoW.WriteFloat(0x00CB9814, playerx + 10); // Add 10 feet onto current x pos
//WoW.WriteFloat(0x00CB9818, playery + 10); // Add 10 feet onto current y pos
//WoW.WriteInt(0x00CB97A4, 4); // Set Click to move state 4=Walk
//string Target = WoW.ReadASCIIString(WoW.ReadUInt(WoW.ReadUInt(0x00B68580 + Unitnameoffset1) + Unitnameoffset2), 100);
}
}
}
Please help.