General > Developers Corner
This thread's OP is a lua n00b
Storm:
This censors but it doesn't seem to kick.
MrPresident:
General Advice: If you are having issues with code not working and also not throwing errors then start using debug messages.
Essentially place print("something here") code chunks throughout your code (especially inside of loops and if statements) so that you know exactly where you code is going and where it is not going. It is possible that you set up an if statement wrong and didn't notice.
Eccid:
--- Quote from: Storm on January 09, 2014, 12:06:58 PM ---This censors but it doesn't seem to kick.
--- End quote ---
I commented out the line that kicks for testing and didn't change it back until this afternoon when I looked again. Should work fine now.
Storm:
I actually wanted a code that only censors and doesn't kick so this is perfect for me how it is! The only problem is it doesn't adjust for case. For example if the word "test" is censored, the player can say "TEST" and it isn't censored. Also, if they say the word "Test" it isn't censored, or tEst, etc. Would there be a way to fix this?
MrPresident:
use string.lower (see a lua wiki) to convert the entire message to lower case. Then set all of your key words to lower case.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version