Hello,
I am writing a mod and so far so good. The only issue that I am having is that the error message will not be displayed. I get only the standard error message, but without my custom error message.
What I am trying to do is show an error to guests when they view the topics if certain criteria is met. I am using this code to display the error message after the criteria is met, at the Display.php file in the Sources folder.
if ($context['user']['is_guest'])
fatal_lang_error('my_error_message', false);
Any pointers will be much appreciated.
https://wiki.simplemachines.org/smf/Using_the_SMF_language_system_in_your_mods
so your text will be then:
$txt['my_error_message'] = 'my_error_message text';
Quote from: Pipke on February 25, 2018, 01:04:21 PM
https://wiki.simplemachines.org/smf/Using_the_SMF_language_system_in_your_mods
so your text will be then:
$txt['my_error_message'] = 'my_error_message text';
Thank you for your reply. Yes, I have the language string created. Also if I hard code the error message, it displays nothing as well.
then you need to post more code so we can see what you are doing.
Quote from: Illori on February 25, 2018, 02:58:16 PM
then you need to post more code so we can see what you are doing.
I did a fresh install of Smf and tried it again and now the error is being outputed correctly. Now I have to package up the mod.