View previous topic :: View next topic |
Author |
Message |
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Mon Mar 12, 2018 7:55 am Post subject: |
|
|
what is Anim2? If it's a symbol you need to pass it as a string not a lua variable which would be nil which can't be read which would return nil.
Want to test if ~= work? use Code: | if 1~=0 then print("I'm a f*ing idiot") end |
If it works, IT'S NOT ~= ITS THE PROGRAMMER WRITING THE WRONG CODE.
I do however find it hard to believe that you have a memory record with an id of 1337018780 unless you edited the text file, you'd have to create 1,337,018,779 records to reach that number, that's one billion three hundred thirty seven million, eighteen thousand, seven hundred and seventy nine records.
Now, EVEN IF YOU DO, that code will NEVER "toggle" the value from off to on and back again, it just sets it to false. which disables it. every. single. time.
Want to test toggling? Manually execute this several times and see if the first one toggles (AddressList was added in CE 6.7, prior to that use getAddessList().
Code: | AddressList[0].Active = false |
it. never. will.
similarly you can test
Code: | AddressList[0].Active = true |
again, it will never toggle. manually set it to false, then true, then false again and like MAGIC it actually turns off then on and off again. So, you want to give it the value it does not currently have, for booleans there's a very simply way to get that not. not true is false and not false is true, not not not not not true is false. So, go test
Code: | AddressList[0].Active = not AddressList[0].Active |
Now, like magic when you have the RIGHT code, it works. Now you add your check around it. Of course, make sure what you are testing is correct, if you're reading from an invalid address you will always get nil which is not equal to 0. Oh, and there's no technical reason to use 0x00000000 instead of just 0, but it'll work.
Now, if you know for a fact that everything is correct and you can show all the values and find a simple way to duplicate the error, then feel free to come say "Hey, I found this case where it doesn't seem to work as intended".
_________________
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 138
Joined: 06 Jul 2014 Posts: 4275
|
Posted: Mon Mar 12, 2018 10:14 am Post subject: |
|
|
Meiyoh wrote: | I said this long ago that lua if unequal statement does not work. |
And I told you long ago that you were the one making a mistake [post]. Look at your code and figure out what you're doing wrong. If you can't figure it out, other people might help if you provide more information (i.e. the type and value of Anim2).
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
Meiyoh Master Cheater Reputation: 1
Joined: 14 Mar 2015 Posts: 400
|
Posted: Mon Mar 12, 2018 10:31 am Post subject: |
|
|
ParkourPenguin wrote: | Meiyoh wrote: | I said this long ago that lua if unequal statement does not work. |
And I told you long ago that you were the one making a mistake [post]. Look at your code and figure out what you're doing wrong. If you can't figure it out, other people might help if you provide more information (i.e. the type and value of Anim2). |
I don't see anything wrong.
The type of the value is HEX 4 Bytes codes.
Why should I be the wrong. It does not work for any kind of codes.
--FreeER
The codes does toggle when when i use something else than ~= Example >=
However the value is UNKNOWN and I prefer it to be just Unequal although now I see Unequal is useless for my work.
This proves that script I made works just "Unequal" does not work at all.
PS: Thanks for the clear insult .
Further talking is useless for me here.
_________________
I am the forgotten one the dead one. |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Mon Mar 12, 2018 12:16 pm Post subject: |
|
|
use round braces around specific compare statements
and understand that nil is not 0
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Meiyoh Master Cheater Reputation: 1
Joined: 14 Mar 2015 Posts: 400
|
Posted: Tue Mar 13, 2018 2:47 am Post subject: |
|
|
Dark Byte wrote: | use round braces around specific compare statements
and understand that nil is not 0 |
I know nil is not 0 address is not nil it's clearly displaying 00000000 and when animation changes it goes different value. However CE does not recognize this and does nothing . Anyway reporting bugs here is useless. Its always MY fault " I am fucking idiot" as someone said here.
Thanks for nothing.
_________________
I am the forgotten one the dead one. |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Tue Mar 13, 2018 4:09 am Post subject: |
|
|
It probably IS your fault though. Check your code again, most likely your round braces are missing, or at the wrong spots, or something is returning nil, and you're displaying it as 00000000
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Meiyoh Master Cheater Reputation: 1
Joined: 14 Mar 2015 Posts: 400
|
Posted: Tue Mar 13, 2018 4:22 am Post subject: |
|
|
Dark Byte wrote: | It probably IS your fault though. Check your code again, most likely your round braces are missing, or at the wrong spots |
Code: | local sAddrAnim2 = "[_DebugAnimId]+D0"
local Anim2 = readInteger(sAddrAnim2)and GetAddress(sAddrAnim2)
function enableifModel(sender)
if ReadInteger(Anim2) ~=0x00000014 then --fix crap anim id
AddressList.getMemoryRecordByID(1337018780).Active = false
end
end
tcupf=createTimer(nil, true)
timer_onTimer(tcupf, enableifModel)
timer_setInterval(tcupf, 100) --check every 100 milliseconds |
the pointer DebugAnimId clearly states NOT 0x0 but script wont detect it. However if I put >=0x it will.
_________________
I am the forgotten one the dead one. |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Tue Mar 13, 2018 6:31 am Post subject: |
|
|
Currently not behind a pc with ce so can't test
But one thing i see: the address stored in Anim2 will never change even when the address at _DebugAnimId does
so if the pointer changes and the old memory is reused by something else you'll read a random value, which can if course be bigger than 0
try printing the result of readInteger (disable view->show on print)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Tue Mar 13, 2018 7:57 am Post subject: |
|
|
Try some thing like this:
Code: | local sAddrAnim2 = '[_DebugAnimId]+D0'
function enableifModel(timer)
if getAddressSafe(sAddrAnim2) ~= nil and readInteger(sAddrAnim2) ~= 0x14 then
local mr = AddressList.getMemoryRecordByID(1337018780)
mr.Active = not mr.Active
end
end
tcupf = createTimer(MainForm)
tcupf.Interval = 100
tcupf.onTimer = enableifModel |
_________________
|
|
Back to top |
|
|
|