CLEO Help What is wrong with my cleo script?

CLEO related
Status
Not open for further replies.

aPELAobr

Active member
Joined
Jan 13, 2015
Messages
185
Reaction score
0
So guys, i'm making a cleo for type '/sairafk + code' [size=small][size=medium](sairafk = leaveafk and voce esta ausente = you are absent) (https://imgur.com/a/3hxci) but when the message appears on screen, nothing happen.. What is wrong with this code? someone knows?[/size][/size]




Code:
{$CLEO .cs}
0000:
 
 
REPEAT
    WAIT 0
UNTIL 0AFA:  SAMP_IS_READY 
 
WHILE TRUE
    WAIT 0
     
    0C17: 21@ = strlen 0xBAAE70
    IF 
    21@ <> 0
    THEN
        21@++
        alloc 22@ = 21@
        0C24: strncpy destination 22@ source 0xBAAE70 size 21@
        IF
        0AD4: $NOT_USED = 22@ format "/SAIRAFK %s VOCE ESTA AUSENTE %d" 2@v $NOT_USED
        THEN
            say "/SAIRAFK %s" 2@V
            free 22@
        END
    END
 
END /// END WHILE TRUE
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
1. Uppercase (use As Is case converting)
2. 0C24 fails because you replaced the first (aka return) argument with $NOT_USED so it will always be false
3. Your script will also cause memory leak since 22@ string will be freed only if statement is true
4. Why would you increment 21@ (strlen) variable?
 
Status
Not open for further replies.
Top