Results 1 to 3 of 3
  1. #1
    lindra's Avatar
    Join Date
    Apr 2016
    Gender
    male
    Location
    France
    Posts
    109
    Reputation
    16
    Thanks
    2,734

    Question Integer error while using int64

    I try to make a fps unlocker for call of duty ghost but i got this error meassage : 'constant expression not representable in type 'integer''


    vb.net source code:

    Public Class Form1

    Dim a As New WriterClass
    Dim t As New WriterClass
    Private Sub LdThemeGhost1_Click(sender As Object, e As EventArgs) Handles LdThemeGhost1.Click
    Timer1.Start()
    End Sub
    'Fov'
    Private Sub LdTrackBarBlue1_Scroll(sender As Object) Handles LdTrackBarBlue1.Scroll
    a.Process_Handle("iw6mp64_ship")
    a.WriteFloat(a.ReadInteger64(&H1419AB640) + &HC, (LdTrackBarBlue1.Value))
    Label1.Text = "" &
    Format(LdTrackBarBlue1.Value, "#.")
    End Sub

    End Class


    'Thx to help me and tell me how can i fix it ...'

    LINDRA

  2. #2
    Silent's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    5,070
    Reputation
    2172
    Thanks
    8,474
    My Mood
    Bitchy
    show us your memory class
    Click Here to visit the official MPGH wiki! Keep up with the latest news and information on games and MPGH! To check out pages dedicated to games, see the links below!











    dd/mm/yyyy
    Member - 31/01/2015
    Premium - 12/09/2016
    Call of Duty minion - 05/11/2016 - 05/11/2019
    BattleOn minion - 28/02/2017 - 05/11/2019
    Battlefield minion - 30/05/2017 - 05/11/2019
    Other Semi-Popular First Person Shooter Hacks minion - 21/09/2017 - 17/09/2019
    Publicist - 07/11/2017 - 02/08/2018
    Cock Sucker - 01/12/2017 - Unknown
    Minion+ - 06/03/2018 - 05/11/2019
    Fortnite minion - 08/05/2018 - 05/11/2019
    Head Publicist - 08/10/2018 - 10/01/2020
    Developer Team - 26/10/2019 - 10/01/2020
    Former Staff - 10/01/2020



  3. #3
    lindra's Avatar
    Join Date
    Apr 2016
    Gender
    male
    Location
    France
    Posts
    109
    Reputation
    16
    Thanks
    2,734
    Imports System.Runtime.InteropServices
    Imports System.Text
    Public Class WriterClass

    Dim ProcList As Process()

    #Region "Basic Stuff"
    <DllImport("kernel32.dll")> _
    Private Shared Function ReadProcessMemory(hProcess As IntPtr, lpBaseAddress As IntPtr, <[In](), Out()> buffer As Byte(), size As UInt32, ByRef lpNumberOfBytesWritten As IntPtr) As Int32
    End Function
    <DllImport("kernel32.dll")> _
    Private Shared Function WriteProcessMemory(hProcess As IntPtr, lpBaseAddress As IntPtr, <[In](), Out()> buffer As Byte(), size As UInt32, ByRef lpNumberOfBytesWritten As IntPtr) As Int32
    End Function
    <DllImport("user32.dll", CharSet:=CharSet.Auto, ExactSpelling:=True)> _
    Public Shared Function GetKeyState(ByVal virtualKeyCode As Keys) As Short
    End Function
    Private pHandel As IntPtr
    Private ProcessModule As ProcessModule
    Public BaseAddress As Integer
    Public Function Process_Handle(ProcessName As String) As Boolean
    Try
    ProcList = Process.GetProcessesByName(ProcessName)
    If ProcList.Length = 0 Then
    Return False
    Else
    pHandel = ProcList(0).Handle
    ProcessModule = ProcList(0).MainModule
    BaseAddress = ProcessModule.BaseAddress
    Return True
    End If
    Catch ex As Exception
    Console.WriteLine("Process_Handle - " + ex.Message)
    Return False
    End Try
    End Function
    Private Function Read(Address As Integer, Length As Integer) As Byte()
    Dim Buffer As Byte() = New Byte(Length - 1) {}
    Dim Zero As IntPtr = IntPtr.Zero
    ReadProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
    Return Buffer
    End Function
    Private Sub Write(Address As Integer, Value As Integer)
    Dim Buffer As Byte() = BitConverter.GetBytes(Value)
    Dim Zero As IntPtr = IntPtr.Zero
    WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
    End Sub
    #End Region

    'This is the part you want to edit
    #Region "Write Functions (Integer & String)"
    Public Sub WriteInteger(Address As Integer, Value As Integer)
    Write(Address, Value)
    End Sub
    Public Sub WriteString(Address As Integer, Text As String)
    Dim Buffer As Byte() = New ASCIIEncoding().GetBytes(Text)
    Dim Zero As IntPtr = IntPtr.Zero
    WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Text.Length)
    End Sub
    Public Sub WriteFloat(Address As Integer, Float As Single)
    Dim Buffer As Byte() = BitConverter.GetBytes(Float)
    Dim Zero As IntPtr = IntPtr.Zero
    WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, 4, Zero)
    End Sub
    Public Sub WriteBytes(Address As Integer, Bytes As Byte())
    Dim Zero As IntPtr = IntPtr.Zero
    WriteProcessMemory(pHandel, New IntPtr(Address), Bytes, CUInt(Bytes.Length), Zero)
    End Sub
    Public Sub WriteNOP(Address As Integer)
    Dim Buffer As Byte() = New Byte() {&H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90, &H90}
    Dim Zero As IntPtr = IntPtr.Zero
    WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
    End Sub


    #End Region
    #Region "Read Functions (Integer & String)"
    Public Function ReadInteger(Address As Integer, Optional Length As Integer = 4) As Integer
    Return BitConverter.ToInt32(Read(Address, Length), 0)
    End Function
    Public Function ReadFloat(Address As Integer, Optional Length As Integer = 4) As Double
    Return BitConverter.ToSingle(Read(Address, Length), 0)
    End Function
    Public Function ReadString(Address As Integer, Optional Length As Integer = 4) As String
    Return New ASCIIEncoding().GetString(Read(Address, Length))
    End Function
    Public Function ReadBytes(Address As Integer, Length As Integer) As Byte()
    Return Read(Address, Length)
    End Function
    #End Region
    #Region "Extra"
    Public Function HotKey(Key As Keys) As Boolean
    Return Convert.ToBoolean(GetKeyState(Key))
    End Function
    Private Check_res As Boolean = True
    Public Function Check_Value(Value As String) As Integer
    For Each a As Char In Value
    If Char.IsNumber(a, 0) Then
    Check_res = True
    Else
    Check_res = False
    Return 0
    Exit For
    End If
    Next
    Return Convert.ToInt32(Value)
    End Function
    #End Region


    End Class

Similar Threads

  1. [Solved] Help i keep getting error while using the old hacks with riddick bypass
    By mostafa123ava in forum Alliance of Valiant Arms (AVA) Help
    Replies: 2
    Last Post: 03-18-2014, 06:00 AM
  2. [Help Request] "This version was built without LZMA support" error while using abcreplace in OSX
    By IziLife in forum Realm of the Mad God Help & Requests
    Replies: 4
    Last Post: 09-02-2013, 09:37 AM
  3. Error After Using Harold's Bypass
    By kelvinho6666 in forum Combat Arms Hacks & Cheats
    Replies: 16
    Last Post: 08-07-2008, 02:10 PM
  4. [HELP] VB6 error while no-recoile
    By SteeL in forum WarRock - International Hacks
    Replies: 19
    Last Post: 11-06-2007, 11:08 PM
  5. [Error] While trying to make a Korean WarRock account.
    By wr194t in forum WarRock Korea Hacks
    Replies: 17
    Last Post: 10-27-2007, 04:06 PM