KamikazeSripterul
Well-known member
- Joined
- Jun 30, 2019
- Messages
- 353
- Reaction score
- 23
So what I've tried to do is to get the value from the chat and write it in .ini file. 
This is the string : Your account balance is now $25.255.525. It doesn't work. It just gives a lot of errors then crashes.
	
	
	
		
			
			This is the string : Your account balance is now $25.255.525. It doesn't work. It just gives a lot of errors then crashes.
		Code:
	
	alloc 2@ 260
    0B75: samp get_chat_string 99 text_to 2@ prefix_to 3@ color_to 4@ prefix_color_to 5@
    
    if 0C18: 10@ = strstr string1 2@ string2 "Your account balance is now" 15@
    then
        format "%d" 2@
        0AF5: write_string 15@ to_ini_file "cleo\ServerCMD.ini" section "Bank" key "balance"
        chatmsg "{000089}[{770089}Bank Manager{000089}]: {e0388f}Account Balance Changed."
        chatmsg "{000089}[{770089}Bank Manager{000089}]: {e0388f}You can check your new balance using {ffffff}[/bankmenu] {e0388f}> {ffffff}Check your balance"
        wait 1000
    end
    
    free 2@ 
				 
 
		