lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Not sure if this is meant to be, but here it goes:

$ lua -v
Lua 5.2.0  Copyright (C) 1994-2011, PUC-Rio

print ( 'hello %s' ):format( 'world' )

> hello %s
lua: TestString.lua:1: attempt to index a nil value

Is that the expected behavior?

Of course, adding the proper parenthesis around the function call sort this out:

print( ( 'hello %s' ):format( 'world' ) )