This site has been archived and made available for preservation purposes. No edits can be made.
-
Junior Member
[Help me] OnClientAuthenticate(const name{}, const pwd{})
Code :
public OnClientAuthenticate(const name{}, const pwd{})
{
if (!dini_Exists( "%s.ini", name ))
{
diniVAULTCreate( "%s.ini", name );
return true;
}
else
{
return false;
}
}
when i compile it:
Code :
base.pwn(35) : warning 202: number of arguments does not match definition
base.pwn(37) : warning 202: number of arguments does not match definition
I am used Dini include.
And when i started this function (enter to server), its just creating file %s.ini.
Last edited by Lobzz1k; 09-03-2012 at 04:26 PM.
-
Which is line 35 / 37? You'll need to show us the "Dini" include.
-
Member
as far as i know dini_Exists/diniVAULTCreate take only one parameter (string, which includes path/filename)
-
Junior Member
if (!dini_Exists( "%s.ini", name )) -- line 35
diniVAULTCreate( "%s.ini", name ); -- line 37
Dini functions
Code :
stock dini_Exists(filename[]) {
return fexist(filename);
}
stock diniVAULTCreate(filename[]) {
if (fexist(filename)) return false;
new File:fhnd;
fhnd=fopen(filename,io_write);
if (fhnd) {
fclose(fhnd);
return true;
}
return false;
}
-
Junior Member
Originally Posted by
NeoPhoenix
as far as i know dini_Exists/diniVAULTCreate take only one parameter (string, which includes path/filename)
I know, %s is definition and name fill this definition.
-
Member
does not change that parameters does not match. you have to use strformat and use the formated string as parameter
-
Senior Member
Code :
new filePath[64];
strformat(filePath, sizeof(filePath), true, "%s.ini", name);
if (!dini_Exists(filePath))
{
diniVAULTCreate( filePath );
return true;
}
There you go.
I just come here to view whether there has been any progress or not, and review the wonderful progress that Recycler and the development team has made.
My sincere thanks goes to them and to others who value my contributions the community, not to mention the ones that solely contribute.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules