Чота затуп с регулярками

nikusyaxxs

Известный
Автор темы
331
104
Версия SA-MP
  1. 0.3.7 (R1)
123:
function se.onShowDialog(dialogId, style, title, button1, button2, text)
    if dialogId == 235 then
        for line in text:gmatch('[^\r\n]+') do
            if line:find('Текущее состояние счета: ') then
                local azCoins = line:match('.*') --%d+ ;
                sampAddChatMessage(azCoins, -1 )
            end
            if line:find('Деньги на депозите:') then
                local str = line:match('.*')    --%[%d+%]
                sampAddChatMessage(str, -1)
            end
            if line:find("Имя") then
                local nick = line:match('%w+_%w+')
                sampAddChatMessage(nick, -1)
            end
            if line:find("Деньги в банке: ") then
                local bank = line:match('.*')
                sampAddChatMessage(bank, -1)
            end
            if line:find('Состояние личного счета №%d+: ') then
                local strs = line:match('.*')
                sampAddChatMessage(strs, -1)
            end
        end
    end
   -- return {dialogId, style, ('[%d] %s'):format(dialogId, title), button1, button2, text}
end

Код то рабочий, но вариант считывать каждый символ меня не устраивает. В комментах то, как я пытался считывать только нужную мне информэйшен, но это не работает :|
Помогите пожалуйста