View previous topic :: View next topic |
Author |
Message |
Oxijen Expert Cheater
Reputation: 0
Joined: 07 May 2020 Posts: 163 Location: On The Moon
|
Posted: Sun Jul 26, 2020 10:37 am Post subject: I guess string.format |
|
|
I have in a CEMEMO line 1 a string.
This string is "value, value".
Like this "1664, 544".
I am trying to set the value "1664" equal to x and the second value to y.
But how can I achieve that??
I have no idea what string.format does, all that I have found on google was not useful (for me) and didn't really understand how is it useful in their examples not cuz they explained it badly... (cuz I am dumb )
I hope you can help me. : )
_________________
I can see you Hitler
Especially When I am On the Moon!!
You are Right now in cheat engine forum  |
|
Back to top |
|
 |
exohaxor Expert Cheater
Reputation: 1
Joined: 02 Sep 2018 Posts: 101
|
Posted: Sun Jul 26, 2020 10:52 am Post subject: |
|
|
assuming you are trying to make the mouse position recorder and you want to assign x,y from getMousePos()
you can do this:
Code: |
local x,y = getMousePos() |
or if you are trying to store the mouse positions use a table instead of a memo
_________________
hi |
|
Back to top |
|
 |
Oxijen Expert Cheater
Reputation: 0
Joined: 07 May 2020 Posts: 163 Location: On The Moon
|
Posted: Sun Jul 26, 2020 11:02 am Post subject: |
|
|
srr, I thought you mean by "table" a "form" 🤦♂️
_________________
I can see you Hitler
Especially When I am On the Moon!!
You are Right now in cheat engine forum  |
|
Back to top |
|
 |
Corroder Grandmaster Cheater Supreme
Reputation: 75
Joined: 10 Apr 2015 Posts: 1668
|
Posted: Sun Jul 26, 2020 11:19 am Post subject: |
|
|
If you must use CEMemo1 lines text for your mouse coordinate, as you wish:
Code: | txt = UDF1.CEMemo1.Lines.Text --- say "1664,544"
x, y = txt:match("([^,]+),([^,]+)")
setMousePos(x, y) |
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4704
|
Posted: Sun Jul 26, 2020 11:31 am Post subject: |
|
|
https://www.lua.org/pil/20.3.html
This was written for Lua 5.0 (CE uses 5.3), but most of the information is still relevant.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
 |
Oxijen Expert Cheater
Reputation: 0
Joined: 07 May 2020 Posts: 163 Location: On The Moon
|
Posted: Sun Jul 26, 2020 2:36 pm Post subject: |
|
|
Thank Ya All
_________________
I can see you Hitler
Especially When I am On the Moon!!
You are Right now in cheat engine forum  |
|
Back to top |
|
 |
|