Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public:loadBadWords() {
- new File:file = fopen(BAD_WORDS_FILE, io_read);
- new i, string[30];
- if (file) {
- while(fread(file, string)) {
- if (strlen(string) > 0) {
- printf("Before cutting, string is '%s'", string);
- if (sscanf(string, "s[20]", badWords[i])) {
- printf("Could not get a word from '%s'", string);
- }
- else {
- printf("Bad word loaded: %s", badWords[i]);
- }
- }
- else {
- printf("Could not load bad word '%s'", string);
- }
- i++;
- }
- }
- else {
- file = fopen(BAD_WORDS_FILE, io_write);
- fclose(file);
- print("0Admin: badWords file does not exist - creating.");
- loadBadWords();
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment