20.03.2020, 10:03
1. Try using search function to check if solution to your problem already exists.
2. Provide full problem description. The more information you provide the easier it will be to help you. Same thing applies to topic name. Informative topic names will help other users find solutions on their own.
3. Provide complete script listing. It's not possible to figure out what is not working if only a small chunk of the whole script is provided.
4. Use log function to capture return values to figure out why function call fails. By convention in case of an error function returns at least two values: first one is nil, second one contains the error message.
Bad example
Good example
2. Provide full problem description. The more information you provide the easier it will be to help you. Same thing applies to topic name. Informative topic names will help other users find solutions on their own.
3. Provide complete script listing. It's not possible to figure out what is not working if only a small chunk of the whole script is provided.
4. Use log function to capture return values to figure out why function call fails. By convention in case of an error function returns at least two values: first one is nil, second one contains the error message.
Bad example
Code:
data = require('ssl.https').request('https://google.com/')
log(data) -- data is nil in case of an error, no further information provided
Good example
Code:
data, err = require('ssl.https').request('https://google.com/')
log(data, err) -- data is nil in case of an error, error information provided in err variable