лог Журнала в файл

Ask for help

Moderators: Murderator+, Murderator

Post Reply
xarek
Posts: 115
Joined: 2006-03-08 20:53:28

лог Журнала в файл

Post by xarek »

Code: Select all

var fl=file("C:\1.txt")

sub abs()

fl.open()
fl.WriteLn(UO.Journal())
fl.close()

end sub


как сделать что бы он не последнее слово записывал а весь Журнал??
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

Code: Select all

sub main()
   var i, f = file( '1.txt' )
   f.create()
   f.open()
   for i = 0 to 99
      f.writeLn( uo.journal( i ) )
   next
   f.close()
endsub
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
xarek
Posts: 115
Joined: 2006-03-08 20:53:28

Post by xarek »

Гдето видил что бы он не перезаписывал файл а добовлял в конце файла новые записи, но уже не могу найти, там суть в одной строчке но найти не могу. и За одно не подскажите по другому скрипту. как мне присвоить perm2 слово "ДА" prem2=(да) много чего перепробывал не получается(
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

f.create() - эту строку сотрите :)

PS: perm2 = "ДА"
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
xarek
Posts: 115
Joined: 2006-03-08 20:53:28

Post by xarek »

Destruction wrote:
PS: perm2 = "ДА"


Большое спасибо, но не работает:(
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
xarek
Posts: 115
Joined: 2006-03-08 20:53:28

Post by xarek »

Code: Select all

line=UO.injournal(name)
per1=Trim(Right(UO.Journal(line-1),1))



     if val(per1) == per2 then

все равно не катит per2="да" но он почему не приравнивает их.


и по поводу лог файла, он почему то не добовляет новые записи. а заменяет.
Post Reply