CLEO Help Directory to .ini

CLEO related
Status
Not open for further replies.

belle_delphine.py

Active member
Joined
Jul 28, 2019
Messages
46
Reaction score
11
Location
Sibiu
so i have this script >
Rich (BB code):
{$CLEO .cs}

//-------------MAIN---------------
0662: printstring "Shitty autocmdsender"
thread 'AUTOCMDSENDER'



:GETINFO
wait 0
if
    0AAB:   file_exists "CLEO\autocmdsender.ini"
    else_jump @ERROR

    0AF0: 0@ = get_int_from_ini_file "CLEO\autocmdsender.ini" section "DELAY" key "MILISECONDS"
    0AF4: 1@v = read_string_from_ini_file "CLEO\autocmdsender.ini" section "COMMAND" key "TYPE"



:MAIN
wait 0
    if and
    056D:   actor $PLAYER_ACTOR defined
    0256:   player $PLAYER_CHAR defined
    else_jump @MAIN

WHILE TRUE
    wait 0

    0AF9: samp say_msg "%s" 1@v
    wait 0@




:ERROR
wait 0
    0ACD: show_text_highpriority "~B~FILE MISSING : '~R~Autocmdsender.ini~B~'" time 2500
    0A93: end_custom_thread

my .ini looks like this >

Rich (BB code):
[DELAY]
MILISECONDS=10000

[COMMAND]
TYPE=test123

the problem is that when i test it, it cant find "CLEO\autocmdsender.ini", and jumps to "@Error", although they are placed in ...\CLEO, and idk why
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
low syntax is very complicated, Better use hight syntax.
PHP:
{$CLEO .cs}

0000: 

0662: printstring "Shitty autocmdsender"
thread 'AUTOCMDSENDER'

 WAIT 8500


WHILE TRUE
wait 0

IF
0AAB:   file_exists "CLEO\autocmdsender.ini"
THEN
    0AF0: 0@ = get_int_from_ini_file "CLEO\autocmdsender.ini" section "DELAY" key "MILISECONDS"
    0AC8: 1@ = allocate_memory_size 1024
    0AF4: 1@ = read_string_from_ini_file "CLEO\autocmdsender.ini" section "COMMAND" key "TYPE"
ELSE
    0ACD: show_text_highpriority "~B~FILE MISSING : '~R~Autocmdsender.ini~B~'" time 2500
    0A93: end_custom_thread
END

IF AND
056D:   actor $PLAYER_ACTOR defined
0256:   player $PLAYER_CHAR defined
THEN
    0AF9: samp say_msg "%s" 1@
    WAIT 0@   
END

END
 
Status
Not open for further replies.
Top