CLEO Help scan_string

CLEO related
Status
Not open for further replies.

faggylie

Active member
Joined
Nov 29, 2014
Messages
38
Reaction score
0
Hello!
I currently have this:
wait 0
0B35: samp 1@ = get_last_command_params
if
0AD4: 4@ = scan_string 1@ format "%s%d" 5@v 9@

I have tried using 5 [member=21661]S[/member] and just normal 5@ but it doesn't work. It sends the message right if it doesn't match but then this doesn't work(when I use text functions nothing prints too):

0B38: samp connect_to_server 5@v port 9@

The port (the 9@ variable) works as it should.
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
Yeah, it doesn't work with @v vars, idk why.

Code:
0B35: 1@
IF 0AD4: 2@ = scan_string 1@ format "%s%d" v$x 9@
THEN
    0C17: 2@ = strlen 1@
    2@ -= 5 //cuz port is uzually 7777
    alloc 3@ = 32
    0c11: 3@ 0 32
    0C24: strncpy dest 3@ source 1@ size 2@
    0B38: samp connect_to_server 3@ port 9@
    free 3@
END
 
Status
Not open for further replies.
Top