Quote:
Originally Posted by fysiks
Which of the following sections start with an N, S, or M:
- Commands
- Player Models
- Access Flags
- Usage Example
Also, I'm not sure why you changed it but replace(szData, charsmax(szData), "^n", "") will be unreliable. You should change it back to trim(szData).
And a bonus tip, you shouldn't use feof() as your while loop condition. You should use the fgets() for the condition. Change this:
PHP Code:
while(!feof(iFilePointer)) { fgets(iFilePointer, szData, charsmax(szData))
to this:
PHP Code:
while( fgets(iFilePointer, szData, charsmax(szData)) ) {
|
Code:
This is start section
case 'S', 's': iSection = SECTION_SETTINGS
Code:
Also i change it to this but still didn't work
This section for commands, access Flags
case 'S', 's': iSection = SECTION_SETTINGS
This section for models
but usage example in get_user_vip function
case 'M', 'm': iSection = SECTION_MODEL
default: iSection = SECTION_NONE
I think the problem in not in file coding function because if there the file will work but i will get error but i think there's some other thing blocking it because at first time when i coded it, it worked without any problem but i don't remember what did i do make it doesn't work i recoded it but still didn't work!
__________________