Jump to content

Digest October-December

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

December November October

Servers monitoring and the Addons Editor

We present you two legends. All dreams come true.

Servers monitoring The Addons Editor

A statistics bot for Telegram

Convenient analytics right on your phone.

Read more

Game tooltips

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

Read more

The Addons Updater

Let us to introduce the addons updating software and to share the details

Read more Download

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


HugoOlivera

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

Библиотека стандартного ввода-вывода в аллодовском луа отключена.

  • Like 1
  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

×
×
  • Create New...

Important Information

By using our site you agree to the Terms of Use