Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Error in script : [string "function GetTheProcessList()

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
[email protected]
How do I cheat?
Reputation: 0

Joined: 26 Jan 2024
Posts: 0
Location: egypit

PostPosted: Fri Jan 26, 2024 9:58 pm    Post subject: Error in script : [string "function GetTheProcessList() Reply with quote

Error in script : [string "function GetTheProcessList()
..."]:2: <name> expected near '='




function GetTheProcessList()

local = {}

local Sl=createStringlistt()
getProcesslist(SL)

for i=0,strings_getstring(SL , i)
T[i] = strings_getString(SL , i)
end

return
end

function GetPros(sender)
local PL = GetTheProcessList()
local S ={}
local variable = ("Conquer Online - Dragon`s Ascension");
UDF1_CheckListBox.Clear()

for x = 0, #PL do
if variable == "ALL"
them
UDF1_CheckListBox1.Items.Add (PL[x] )
else

if string.sup (PL [x] , 10) == variable

then
S[ #S+1] = PL [x] --list for reference
UDF1_CheeckListBox.Items.Add (PL[x])
end

end
end


end
GetPros()
function OpenPro ()

local a = UDF1_CheckListBox1.ItemIndex

if a ~= -1 --negative 1 is nno selection
then
local b + string.sup (UDF1_CheckListBox.Items [a] ,0,Cool
b = tonumber (b,16)
openProcess (b)
else
showMassage ("Erorr")
end

end

function UDF1_CEButton4Click (sender)
GetPros() --Scan
end

function UDF1_CEButton5Click (sender)

OpenPro () --Select
end

function UDF1_CEButton1Click(sender)

end

function UDF1_CEButton2Click(sender)

end

function UDF1_CheckListBox1Click(sender)

end

_________________
This is a block of text that can be added to posts you make. There is a 300 character limit
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
AylinCE
Grandmaster Cheater Supreme
Reputation: 32

Joined: 16 Feb 2017
Posts: 1260

PostPosted: Sat Jan 27, 2024 6:27 am    Post subject: Reply with quote

Code:
function GetTheProcessList()

local = {} -- table name? T?

local Sl=createStringlistt() -- listt ?
getProcesslist(SL)

for i=0,strings_getstring(SL , i)
T[i] = strings_getString(SL , i)
end

return
end


-- use function:
Code:
function GetTheProcessList()

local T = {}
list = getProcesslist()

 for i,k in pairs(list) do
  T[#T + 1] = k -- i = pid, k = processName.exe ..
 end

return T
end


-- and .. (Edit ..)
Code:
function OpenPro ()

local a = UDF1_CheckListBox1.ItemIndex

if a ~= -1 --negative 1 is nno selection
then
local b + string.sup (UDF1_CheckListBox.Items [a] ,0,Cool
b = tonumber (b,16)
openProcess (b)
else
showMassage ("Erorr")
end

end


--Use UDF1.CEComboBox1 ..
Code:
function OpenPro()
prcssName = UDF1.CEComboBox1.text
pid1 = getProcessIDFromProcessName(prcssName)
  if pid1~=nil then
   openProcess(prcssName)
  else
   showMessage("The selected transaction does not appear to be open. Please tray again!")

   -- update combobox list ..
     list = getProcesslist()
     local variable = ("Conquer Online - Dragon`s Ascension.exe") -- Your process.exe ?
     UDF1.CEComboBox1.Clear()
     UDF1.CEComboBox1.Items.Add("Select Process")

    for i,k in pairs(list) do
     if k==variable then -- k = all processName.exe
      UDF1.CEComboBox1.Items.Add(k)
     end
    end
   UDF1.CEComboBox1.ItemIndex=0
  end
end

UDF1.CEComboBox1.OnChange=OpenPro


-- Here's a different code for you to test during the process listing and running (openProcess()) phase:
https://forum.cheatengine.org/viewtopic.php?p=5788059#5788059

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites