Customizing SMF > SMF Coding Discussion

Custom script, strange fatal_error behaviour

(1/1)

Uhehesh:
Hello.

I am using 1.1.16 and writing custom roleplay script to be used with SMF. I have almost finished it but now I have some strange problems.
I use this function:

--- Code: ---function rulesFail($text) {
fatal_error('<a href="here_comes_link_to_rules">'.$text.'</a>', true);
}
--- End code ---
I have many calls of this function and also fatal_error itself one time in the code, but none of them work right. The only thing I get is:

--- Quote ---The last posting from your IP was less than 5 seconds ago. Please try again later.
--- End quote ---
While in the log of my user there is an error with correct text.

The second strange thing is that it works quite well if I send not using AJAX (by default forum uses ajax to send messages to topic) but standard way (Preview → Post). However, this also doesn't work always: often it still says that last posting from my IP was less than 5 seconds ago (log has right data).

And the third strange thing is that when it works OK, it escapes html characters in the error message. Is it right behaviour or no?
Sorry if my post is too long or difficult to understand.

P.S. I am writing the second version of rolegame, and it's quite strange that previous version worked well without these issues!

Navigation

[0] Message Index

Go to full version