CLEO Help get file name of CLEO script

CLEO related
Status
Not open for further replies.

Hackz0r

Active member
Joined
Oct 31, 2016
Messages
25
Reaction score
0
I'm trying to get the name of a CLEO script to a string to be used with 0A92: create_custom_thread "name.cs" to restart the script elsewhere. I did this so far, but it doesn't work properly if the name is more than 3 chars (xxx.cs) even with allocating memory to the string. Is there a memory address to read the name or anything like that?

Code:
0A9F: 0@ = current_thread_pointer
0@ += 0x8
chatmsg "%s" -1 0@
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
On my side it does contains maximum 7 chars out of 20 or so, looked up through cheat engine, seems like there's no other addresses that remains for script's name
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
According to CLEO source code, 0A92 works with files from the cleo folder, but the full name isn't saved anywhere, except the first 7 chars.
So while you can use 0ABA to terminate the script using those 7 chars, it's not enough to use 0A92 unless the cleo file name is 7 or less.

https://github.com/cleolibrary/CLEO4/blob/2ab52dd2dd907779241be2a28a1224f7eb18c016/CScriptEngine.cpp#L973
 
Status
Not open for further replies.
Top