I want to incorporate the ability to display Hyperlinked text derived from content in a text file. For the purpose of this post, I've stripped out everything that isn't directly part of
1. open file
2. get line of text from file
3. display line
4. repeat until eof
Current alias
<aliases>
<alias
match="showlink"
enabled="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>for line in io.lines ("link.txt") do
Hyperlink ("line")
end -- for
</send>
</alias>
</aliases>
If I replace the "Hyperlink" function with "Note" it finds the text just fine, but as it is I can only get the following error;
[string "Alias: "]:2: attempt to call global 'Hyplerlink' (a nil value)
stack traceback:
[string "Alias: "]:2: in main chunk
The first two lines of text in example link.txt file are;
("run 2s3en ","Bakery: run 2s3en Food for the hungry adventurer. ","black","red",0)
("run 2s5en ","Provisions: run 2s5en General supplies (torches, containers, etc.). ","black","red",0)
These two lines work just fine when embedded as part of an Alias that directly uses the Hyperlink function. The purpose of this is part of my happy plan to add yet more options for navigating and infomation onscreen, particularly with my maps.
Advice gratefully appreciated.
1. open file
2. get line of text from file
3. display line
4. repeat until eof
Current alias
<aliases>
<alias
match="showlink"
enabled="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>for line in io.lines ("link.txt") do
Hyperlink ("line")
end -- for
</send>
</alias>
</aliases>
If I replace the "Hyperlink" function with "Note" it finds the text just fine, but as it is I can only get the following error;
[string "Alias: "]:2: attempt to call global 'Hyplerlink' (a nil value)
stack traceback:
[string "Alias: "]:2: in main chunk
The first two lines of text in example link.txt file are;
("run 2s3en ","Bakery: run 2s3en Food for the hungry adventurer. ","black","red",0)
("run 2s5en ","Provisions: run 2s5en General supplies (torches, containers, etc.). ","black","red",0)
These two lines work just fine when embedded as part of an Alias that directly uses the Hyperlink function. The purpose of this is part of my happy plan to add yet more options for navigating and infomation onscreen, particularly with my maps.
Advice gratefully appreciated.