Yoko

All sides of Injection
It is currently 2026-01-17 09:02:10

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2004-09-27 14:35:44 
Offline

Joined: 2004-04-23 19:58:03
Posts: 60
http://yoko.netroof.net/forum/viewtopic ... light=html
вот здесь лежит скрипт, в самомо конце есть функция, отвечающая за генерацию результатов макроса в html вид.
Есть от меня большая просьба: помогите вычленить этот кусок, или киньте пару идей, как вообще можно записывать результаты в html.
За любую реальную помощь буду весьма признателен.


Top
   
 Post subject:
PostPosted: 2004-09-27 15:47:22 
Offline

Joined: 2004-04-23 19:58:03
Posts: 60
уточнение.
я взял два пункта из этого скрипта:
Code:
############################################################ 
#   Определение названия руды по цвету
############################################################
sub colortostring(color)
if color=="0x0455" then
return "<font color=#0000ff>Black Rock Ore</font>"
endif
if color=="0x0028" then
return "<font color=#0000ff>Obsidian Ore</font>"
endif
end sub


Code:
############################################################ 
#   Лог
############################################################
sub log(what,name,count)
var f=file(MiningDir+date()+".html")

if what==0 then
if not f.open() then
f.create()
f.writeln("<title>"+"Результаты копания "+date()+"</title><body text=#000000 bgcolor=#ffffff background=img/bg.jpg>")
f.writeln("<p align=center><font size=+1><b>Начало копания "+time()+"</b></font></p><Hr size=4>")
else
repeat
safecall f.readln()
until f.eof() or fatal error
f.writeln("<p align=center><font size=+1><b>Начало копания "+time()+"</b></font></p><Hr size=4>")
endif
f.close()
endif
############################################################
if what==1 then
f.open()
repeat
safecall f.readln()
until f.eof() or fatal error
f.writeln("<p align=center><b>Сложил в сундук "+time()+"</b></p>")
f.close()
endif
############################################################
if what==2 then
f.open()
repeat
safecall f.readln()
until f.eof() or fatal error
f.writeln(count+" "+colortostring(name)+"<BR>")
f.close()
endif
end sub

вообщем так, с учётов всех функции и объявленных переменных, пр запуске функции, что log(what,name,count), что colortostring(color) - выдаётся ошибка, что "неверное кол-во аргументов" соответствующей фунции. В чём причина?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited