error 035: argument type mismatch (argument 1) -
paulbobin - 01.04.2015
Код:
#define Loop(%0,%1) \
for(new %0 = 0; %0 != %1; %0++)
//==============================================
if(rcInfo[raceinc] != true && rcInfo[racestar] != true)
{
new string[20];
format(string, sizeof(string), "%s", inputtext);
rcInfo[namebuild] = string, rcInfo[buildrace] = true, rcInfo[playercreaterc] = playerid;
//..
new INI:File = INI_Open(FolderRaces(inputtext));
INI_SetTag(File, "Information race");
INI_WriteString(File, "name", inputtext);
INI_WriteInt(File, "checkpoints", 0);
INI_WriteInt(File, "vehicle", 0);
INI_WriteFloat(File, "sizeveh", 0.0);
INI_WriteFloat(File, "angleveh", 0.0);
Loop(x, 5)
{
format(string, sizeof(string), "BestRacerTime_%d", x);
Error >> dini_Set(File, bstring, "0");
format(string, sizeof(string), "BestRacer_%d", x);
Error >> dini_Set(File, bstring, "noone");
}
INI_Close(File);
: error 035: argument type mismatch (argument 1)
: error 035: argument type mismatch (argument 1)
Anyone please Fast
Thank You
Re: error 035: argument type mismatch (argument 1) -
Gammix - 01.04.2015
What hell! You cant access Y_INI formated files from dini.
Its simple though:
pawn Код:
dini_Set(FolderRaces(inputtext), string, "0");
And you are ploting a var bstring which is not created, might be string instead.
I wonder why dont you use Y_INI for that purpose too?
pawn Код:
INI_WriteString(File, string, "0");
Re: error 035: argument type mismatch (argument 1) -
BroZeus - 01.04.2015
See the correct dini_set format here
https://sampwiki.blast.hk/wiki/Useful_Functions#dini_Set
So the correct code would be :
PHP код:
dini_Set(FolderRaces(inputtext), bstring, "0");
dini_Set(FolderRaces(inputtext), bstring, "noone");
EDIT: too late some one already posted solution
Re: error 035: argument type mismatch (argument 1) -
paulbobin - 02.04.2015
i want to loop the statement
Respuesta: error 035: argument type mismatch (argument 1) -
JuanStone - 02.04.2015
You can't do that, you can use Dini and ini file at the same time but do not use variables for the same file.
PHP код:
if(rcInfo[raceinc] != true && rcInfo[racestar] != true)
{
new string[20];
format(string, sizeof(string), "%s", inputtext);
rcInfo[namebuild] = string, rcInfo[buildrace] = true, rcInfo[playercreaterc] = playerid;
//..
new INI:File = INI_Open(FolderRaces(inputtext)); // new ini
INI_SetTag(File, "Information race");
INI_WriteString(File, "name", inputtext);
INI_WriteInt(File, "checkpoints", 0);
INI_WriteInt(File, "vehicle", 0);
INI_WriteFloat(File, "sizeveh", 0.0);
INI_WriteFloat(File, "angleveh", 0.0);
INI_Close(File); // close
Loop(x, 5)
{
// new var file dini ("dini read and write( e.g=5)" ini(e.g = 5).).
format(string, sizeof(string), "BestRacerTime_%d", x);
dini_Set(File, bstring, "0");
format(string, sizeof(string), "BestRacer_%d", x);
dini_Set(File, bstring, "noone");
}
You should use INI for the two if it is the same system.
PHP код:
if(rcInfo[raceinc] != true && rcInfo[racestar] != true)
{
new string[20];
format(string, sizeof(string), "%s", inputtext);
rcInfo[namebuild] = string, rcInfo[buildrace] = true, rcInfo[playercreaterc] = playerid;
//..
new INI:File = INI_Open(FolderRaces(inputtext)); // new ini
INI_SetTag(File, "Information race");
INI_WriteString(File, "name", inputtext);
INI_WriteInt(File, "checkpoints", 0);
INI_WriteInt(File, "vehicle", 0);
INI_WriteFloat(File, "sizeveh", 0.0);
INI_WriteFloat(File, "angleveh", 0.0);
for(new x; x != 5; 5++)
{
strdel(string, 0, 20);
format(string, sizeof(string), "BestRacerTime_%d", x);
INI_WriteString(File, string, "data save ?");
strdel(string, 0, 20);
format(string, sizeof(string, "BestRacer_%d", x);
INI_WriteString(File, string, "data save ?");
}
INI_Close(File); // close
}
Re: error 035: argument type mismatch (argument 1) -
Crayder - 02.04.2015
The solution by Juan is correct, but why are you trying to use YINI and dini in the same script? Also, YINI's file variable will not work in a dini function. Their file variable dont even use the same tag.