Help about Reading from file strings.
The problem: is reading only the first line, sorry, i'm noob at reading files, thank's for help:
Code:
#include <amxmodx> |
Re: Help about Reading from file strings.
Your while structure should be:
PHP Code:
|
Re: Help about Reading from file strings.
Is acting the same, reading only first line:
Code:
#include <amxmodx> |
Re: Help about Reading from file strings.
Why are you inserting "break" in the while loop?
|
Re: Help about Reading from file strings.
Quote:
That's the example i see in this topic: https://forums.alliedmods.net/showthread.php?t=46218 COde: PHP Code:
|
Re: Help about Reading from file strings.
Remove the "break". That causes the loop to quit execution (i.e. to break out of the loop).
Also, the return value of fgets() is undocumented so it's best to not use it as the condition at all. Using !feof() is more appropriate. |
Re: Help about Reading from file strings.
fgets() returns the number of characters read in the line, when you reach the end of the file it will output 0. feof() is still the proper choice, even though using fgets() as the condition technically could still work.
Code:
// native fgets(file, buffer[], maxlength);Code:
AAAAACode:
6 chars = AAAAAPHP Code:
|
Re: Help about Reading from file strings.
You forward 'fwd_Touch' is called a lot, just to not pick up weapons. Could you just hook WeaponPickUp event? See for help:
Code:
Quote:
Code:
|
Re: Help about Reading from file strings.
addons_zz, he wants to block a weapon retrieval, such event is not going to help. Same for "contain", it's not going to help. If he wants to block models from a list, then trie yes should be appropriate.
|
Re: Help about Reading from file strings.
Working fine with trie.
But appear other problem, when i try to change the map all key's from Trie is removed, how i can save/load keys from Trie? (TrieSnapshotCreate is working only for 183) Code:
#include <amxmodx> |
| All times are GMT -4. The time now is 09:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.