07.10.2008, 15:41
i was making Some password in file that if she Writes in Game something happenes
For Example:
in file blabla.ini : 5555
That number i want to use in mode so
i'm reading the number in file and making
some new
New NumberX;
than i'm making this NumberX get the value 5555
so If Password Changes in File
Password changes in game
Ok now it means
NumberX(Value) = 5555 right?
But now
i want to make that if someone Write the "NumberX" Value without "/" just
"NumberX" Value
it send him message
So i made it
So when someone writes the NumberX Value it send him message "NumberX Value"
But it dont work and gives me a warning of the line with
if ((strcmp(NumberX, tmp, true, strlen(tmp)) == 0)))
the Warning is: error 035: argument type mismatch (argument 2)
Someone Can help me?
For Example:
in file blabla.ini : 5555
That number i want to use in mode so
i'm reading the number in file and making
some new
New NumberX;
than i'm making this NumberX get the value 5555
so If Password Changes in File
Password changes in game
Код:
public LoadPassword() { new strFromFile[256]; new File: Bla = fopen("blabla.cfg", io_read); if (Bla) { fread(Bla, strFromFile); NumberX= strval(strFromFile); fclose(Bla); } return 1; }
NumberX(Value) = 5555 right?
But now
i want to make that if someone Write the "NumberX" Value without "/" just
"NumberX" Value
it send him message
So i made it
Код:
public OnPlayerText(playerid, text[]) { new tmp[256]; new string[256]; new idx; tmp = strtok(text, idx); if ((strcmp(NumberX, tmp, true, strlen(tmp)) == 0))) { SendClientMessage(playerid, COLOR_GREY, "NumberX Value"); return 0; } else { SendClientMessage(playerid, COLOR_GREY, "Not NumberX Value"); return 0; } return 1; }
But it dont work and gives me a warning of the line with
if ((strcmp(NumberX, tmp, true, strlen(tmp)) == 0)))
the Warning is: error 035: argument type mismatch (argument 2)
Someone Can help me?