Thread Tools Display Modes
11-23-09, 07:49 AM   #1
Fustel
A Murloc Raider
Join Date: Nov 2009
Posts: 7
Writing to a file ?????

Hi all,
I am a noob both in LUA and in UI writing, and I am trying to write some info in a file from a script. All I read about LUA says:

file = io.open("MyFile.txt", "w");
file:write( "Hello world !");
file:close();

but it doens't seems to work.

What is the mistake ??

Last edited by Fustel : 11-23-09 at 07:50 AM. Reason: file:close () ... not just file:close
  Reply With Quote
11-23-09, 08:07 AM   #2
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
That can not be done in wow for security reasons.
  Reply With Quote
11-23-09, 08:13 AM   #3
Fustel
A Murloc Raider
Join Date: Nov 2009
Posts: 7
And no other way to write in a file ?
  Reply With Quote
11-23-09, 08:36 AM   #4
Soulofsin_007
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 125
Saved Variable I believe, just have it hold what you want it to hold.
  Reply With Quote
11-23-09, 08:39 AM   #5
Fustel
A Murloc Raider
Join Date: Nov 2009
Posts: 7
Thaks.... this just what I am reading about ;-)
  Reply With Quote
11-23-09, 09:24 AM   #6
Fustel
A Murloc Raider
Join Date: Nov 2009
Posts: 7
I didn't realize it was THAT simple...
All done. Thanks all.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Writing to a file ?????


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off