Voilà mon code :
public timeweather()
{
new weathertime[] = {1,2,3,8,9};
new rand = random(sizeof(weathertime));
for (new j; j<=MAX_PLAYERS; j++)
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "%d", weathertime[rand]);
new File: filew = fopen("Temps.ini", io_write);
fwrite(filew, coordsstring);
fclose(filew);
}
}
public PutWeather(playerid)
{
new arrCoords[1][64];
new strFromFile2[256];
new Filewa: filewa = fopen("Temps.ini", io_read);//1601
if (filewa)
{
fread(filewa, strFromFile2);//1604
split(strFromFile2, arrCoords, ',');
SetPlayerWeather(playerid, strval(arrCoords[0]));
fclose(filewa);
}
}
Imaginons que je veux prendre un temps au hasard et que le tmeps s'inscrive dans le fichier. Je le fais, et quand je veux mettre le temps au joueur (PutWeather) ca fait un peu tous beugé... J'apporte plus de précisions plus tard.
Voilà quand même mes erreurs :
:\Documents and Settings\desktop\Mes documents\Serveur GTA 0.2x\gamemodes\drrp.pwn(11601) : warning 213: tag mismatch
C:\Documents and Settings\desktop\Mes documents\Serveur GTA 0.2x\gamemodes\drrp.pwn(11604) : warning 213: tag mismatch
C:\Documents and Settings\desktop\Mes documents\Serveur GTA 0.2x\gamemodes\drrp.pwn(11607) : warning 213: tag mismatch
Comment les régler ?