read_file again...
Hi,
i'm working on a plugin like autobind, but the difference is, that the player can decide, if the player wants to bind the keys automatically or not.. For it i want to read a config.ini file with the key and the command for the key in it.. The file should look like this: Code:
; Syntax: "<key>" "<command>"My Code: PHP Code:
Thanks Br41n |
Re: read_file again...
Use the new file natives.
EDIT: Something like this..? Code:
|
Re: read_file again...
Yeah.. thank you, i will try it and will argue with it..
EDIT: One Question: What does the 31 in strbreak() mean? |
Re: read_file again...
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Wanna try again? Summary: STFU! You have no idea what you're talking bout. Quote:
|
Re: read_file again...
OK.. thank you.. now, i got the problem with reading a file working.. but there is one more smaall problem... The script reads the commented lines also... All lines with comments I started with ;..
Code:
; Here is an Example:Thanks Br41n |
Re: read_file again...
That's easy
Code:
|
Re: read_file again...
ok.. thanks.. i tried the same if request, but a little bit wrong... ^^
PHP Code:
|
Re: read_file again...
that should also work... if you're file doesn't look like this
Since the ';' must be at the first "place" in the row, no spaces in front of it... Code:
;code |
Re: read_file again...
You could search all tokens in the line, if the isn't blank(space, hard space) check if it's a ';' then return 1.
But ofcourse you can just get the file to normal. |
| All times are GMT -4. The time now is 06:48. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.