open_dir,close_dir
can anyone teach me how to use read_dir , open_dir or close_dir???
i don't know how to use it,i've read from the amxmodx.org's function guide..:cry: need help ty. |
Re: read_dir,open_dir,close_dir
Don't use read_dir(), it's a deprecated function since it's very slow. You need to use open_dir() + next_file().
A small example with the configs/ directory : Code:
|
Re: read_dir,open_dir,close_dir
so can you tell me why i could't open without open_dir,close_dir?
Code:
#include <amxmodx> |
Re: read_dir,open_dir,close_dir
what?
|
Re: read_dir,open_dir,close_dir
*_dir are for DIRECTORIES (folders), search in funcwiki for "file" to see functions that relate to reading files in amxx to process their info using amxx... for whatever reason.
Your code, however, does nothing of such, it only opens a MOTD window and displays the contents of "data.txt" file to a player. I don't see any revelance of motd when the thread is about directories... and, as one said once: what ? :lol: |
Re: read_dir,open_dir,close_dir
so my plugin does not need "open_dir or close_dir" ? and i can't seem to make it work,when i type /data ,it shows data.txt only..
|
Re: open_dir,close_dir
That's all your code has it doing...
|
Re: open_dir,close_dir
Clearly I'm wasting my... typing.
I already explained what does what, but you still ask a stupid question, what can I do. |
Re: read_dir,open_dir,close_dir
Quote:
open_dir = open directory. A directory is a folder that holds files or other directories. You want to open a FILE, not a DIRECTORY. |
Re: read_dir,open_dir,close_dir
Quote:
|
| All times are GMT -4. The time now is 22:00. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.