CLEO Help help dialog

CLEO related
Status
Not open for further replies.

noob213

Active member
Joined
Sep 15, 2017
Messages
88
Reaction score
6
help me fix my code

I want the integer value obtained from the dialogue to be equal to or greater than 0 and less than 99000 as you can see my code does not work

I'm not very good at this if someone expert can fix the code to make it work well

PHP:
{$CLEO .cs}
0000: NOP


while true
    wait 0
    if
    0ab0: key 90
    then
        0B3B: samp show_dialog id 222 caption "dialog" text "text" button_1 "ok" button_2 "no" style 1
        alloc 12@ 128
    end
     if 
     0B3C:  samp is_dialog_responded id 222 button 2@ list_item 3@ input_text 12@

    then 
    repeat
    wait 0
    0B4A: samp 12@ = get_current_dialog_editbox_text
    until 8B4C: not samp is_dialog_active -1                       
         if
         2@ == 1 
         then 
            if
            0AD4: $NOT_USED = scan_string 12@ format "%d" 20@
            then 
                if and
                12@ >= 0
                12@ < 99000
                then
                    0AF1: write_int 12@ to_ini_file "cleo\config.ini" section "Settings" key "value"
                    free 12@
                else
                chatmsg "error value" -1
            end       
    end
end
end
    free 12@
end
 
Last edited:
Status
Not open for further replies.
Top