Jump to content
Alloder.pro  about Allods with love 😱
Search In
  • More options...
Find results that contain...
Find results in...

Results of the competition "Allods and Life"

Stories, that warm souls.

Read More

Digest April

We talk about what was done and updated in the past month. We help keep abreast of events.

Read more

Game tooltips

Tooltips provide a way for 3rd party fansites and extensions to display detailed information on mouseover.

Read more

Проблемма с выводом в файл


HugoOlivera
 Share

Recommended Posts

local function File_Write(filename, text) -- Write file
    io.output(filename)
    io.write(text)
    io.close()
end
        File_Write("file.lua", "45454")

Подскажите что именно не так?  Не хочет выводить числа в file.lua

 

mods.txt ругается на глобальную переменную io, но разве она не является синтаксисом языка?

 

Если же задать

local io

То в итоге получаем в mods.txt

attempt to index local `io' (a nil value)
Edited by HugoOlivera
Link to comment
Share on other sites

mods.txt ругается на глобальную переменную io, но разве она не является синтаксисом языка?

Нет, не является.

Это такая же таблица, содержащая в себе указатели на функции, как и аллодовские common, avatar, object, unit, itemLib, etc...

Синтаксисом языка является только то, что указано в секции 2 официального мануала.

io же всего лишь часть стандартной библиотеки

Edited by hal.dll
Link to comment
Share on other sites

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

By using our site you agree to the Terms of Use