CLEO HELP I need help, crashing problem.

Joined
Nov 1, 2018
Messages
16
Likes
0
Points
1
1
#1
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 [email protected] //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 [email protected] 512
0BD7: samp get_dialog_text [email protected]
if
0AD4: $NOT_USED = scan_string [email protected] 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." [email protected] [email protected] //IF and SET
then
wait 0
chatmsg "Pica: %s" -1 [email protected]
chatmsg "Namas: %d" -1 [email protected]
free [email protected]
end
end
end

EDIT: Dont blame me about spacing, CODE block just does this for some reason, its spaced properly.
 
Top