 |
|
Veteran Member
|

01-01-2011
, 17:04
Re: New fvault custom function
|
#2
|
Quote:
Originally Posted by .MMYTH.
I make a new function to add to my custom fvault and i want know if is correct:
PHP Code:
stock fvault_remove_data(const vaultname[], const key[], const data[])
{
new filename[128];
_FormatVaultName(vaultname, filename, sizeof(filename) - 1);
if( !file_exists(filename) )
{
return;
}
new file = fopen(_temp_vault, "wt");
new vault = fopen(filename, "rt");
new _data[512], _other[3];
while( !feof(vault) )
{
fgets(vault, _data, sizeof(_data) - 1);
parse(_data, _key, sizeof(_key) - 1, _other, sizeof(_other) - 1);
replace(_data, charsmax(_data), data, "")
trim(data)
}
fclose(file);
fclose(vault);
}
?
|
Suggestion: Test it
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
|
|
|
|