CLEO Help I need help, crashing problem.

CLEO related
Status
Not open for further replies.

dovidas147

Active member
Joined
Nov 1, 2018
Messages
32
Reaction score
2
I've started cleo scripting and wanna learn how to scan strings, the problem is whenever i get string from dialog text and scan it my san andreas crashes, and i don't know why. Tried to cut comparing string to smaller piece, but it doesn't help. Then it just doesn't do scanning at all.
Here's my code:

if 0C14: strcmp string1 "Picų užsakymai" string2 3@ //comparing then if 0B4C: samp is_dialog_active 13040 then 0B47: samp close_current_dialog_with_button 1 end if 0B4C: samp is_dialog_active 1000 then wait 0 alloc 6@ 512 0BD7: samp get_dialog_text 6@ if 0AD4: $NOT_USED = scan_string 6@ format "{ffffff}Tu jau esi priėmęs užsakymą pristatyti {59a8e4}%s {ffffff}picą į {59a8e4}%d {ffffff}namą, jis pažymėtas {59a8e4}mėlynu {ffffff}kvadratuku." 7@ 8@ //IF and SET then wait 0 chatmsg "Pica: %s" -1 7@ chatmsg "Namas: %d" -1 8@ free 6@ end end end
EDIT: Dont blame me about spacing, CODE block just does this for some reason, its spaced properly.
 
Status
Not open for further replies.
Top