Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- syntax print(msg)
- -- prints the included message to the log file (messages.txt in visionaire studios case)
- -- can be wrapped with 'msg' or "msg"!
- ------------------------------------------------------------------------------------- break
- -- basic print example - displays "hello world!" on a line in the messages.txt log file.
- print('hello world!')
- ------------------------------------------------------------------------------------- break
- -- including print in an if else statement: example one
- if print('hello world!') then
- print('message printed - hello world!')
- else
- print('message not printed - hello world!')
- end
- ------------------------------------------------------------------------------------- break
- -- including print in an if else statement: example two (including the local variable)
- -- is so you can include extra things in the printed message
- -- example 01: print_msg .. print_msg2 .. ' - printed to log'
- -- example 02: print_msg .. ' printed to log ' .. print_msg2
- local print_msg = 'hello world!'
- if print(print_msg) then
- print('message printed - ' .. print_msg)
- else
- print(print_msg .. ' - message not printed')
- end
- ------------------------------------------------------------------------------------- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement