Topic: io.read() in-game

Hey! I try to use the io.read() function to get a characters name, but it doesn't work. When I open my game and come to io.read() in the script maratis crashes.

Any tips?

Re: io.read() in-game

Do you get any console output? Or is there perhaps a way to make Maratis more verbose. Or are we dealing with a segfault here? I'm assuming that we have access to all of Lua stdlib in Maratis because why wouldn't we.

Re: io.read() in-game

you probably need to specify a valid file :

file = assert(io.open("file.txt", "r"))
line = file:read()

tutorial found online : http://www.ac-web.org/forums/showthread … e-With-Lua

Re: io.read() in-game

I think he means that when you start a new game, you will need to get the character's name, that the player wants to use (For example: Dan, and someone else wants Rick)

Re: io.read() in-game

Precise. That's what I want to do. Any tips?