CLEO Help about scanstring

CLEO related
Status
Not open for further replies.

HowEnCokkien

Well-known member
Joined
Jul 9, 2017
Messages
307
Reaction score
9
so i try to understand how scanstring works. i created a simple script but it crashes. help me pls.

Code:
{$CLEO .cs}
THREAD "text"

REPEAT
WAIT 100
UNTIL 0AFA:  is_samp_available

0B34: "msg" @TEXT

WHILE TRUE
WAIT 0
END


:TEXT
wait 0
SAMP.IsCommandTyped(2@)
IF 0AD4: 1@ = scan_string 2@ format "%d" 3@
THEN
chatmsg "Testext %d" 
END
SAMP.CmdRet
 

bladero

Active member
Joined
Jan 3, 2017
Messages
73
Reaction score
0
Think its because you need to set case converting in sb settings to as is, or you are using wront data type.
 

HowEnCokkien

Well-known member
Joined
Jul 9, 2017
Messages
307
Reaction score
9
bladero said:
Think its because you need to set case converting in sb settings to as is, or you are using wront data type.

im really stupid lol, i tried both of still same.

edit: if i set it to as is its crashes, if i set it to UPPER then its just show D:. idk whats wrong XD
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
HowEnCokkien said:
bladero said:
Think its because you need to set case converting in sb settings to as is, or you are using wront data type.

im really stupid lol, i tried both of still same.

edit: if i set it to as is its crashes, if i set it to UPPER then its just show D:. idk whats wrong XD

Label name case sonverting? You might have bound /msg command originally to :TeXT but the label itself is :text, or whatever, just check it, your script has no errors if you applied @springfield's edit
 
Status
Not open for further replies.
Top