PDA

View Full Version : Screen Error Help


sampkinq
17/10/2015, 09:40 AM
Hello, it's yellowing screen typing the command. What is the problem ?
Waiting for your help

http://i.hizliresim.com/J66NJE.png

enum SpawnA
{
Arac,
Float:posX,
Float:posY,
Float:posZ,
Float:posBakis
};
new PosAyar[MAX_PLAYERS][SpawnA];



CMD:git(playerid,params[])
{
new XML:file = xml_open("DerbyMaps/race-[dd]Copy/Copy.map");
for(new i = 0; i <= xml_get_int(file, "count(map/spawnpoint)");i++)
{
#define STRING_LENG 2014
new string[STRING_LENG];
new araba,Float:pos[4];

format(string, 1024, "map/spawnpoint[%d]/@vehicle", i);
araba = xml_get_int(file, string);

format(string, STRING_LENG, "map/spawnpoint[%d]/@posX", i);
pos[0] = xml_get_float(file, string);

format(string, STRING_LENG, "map/spawnpoint[%d]/@posY", i);
pos[1] = xml_get_float(file, string);

format(string, STRING_LENG, "map/spawnpoint[%d]/@posZ", i);
pos[2] = xml_get_float(file, string);

format(string, STRING_LENG, "map/spawnpoint[%d]/@rotZ", i);
pos[3] = xml_get_float(file, string);

PosAyar[i][Arac] = araba;
PosAyar[i][posX] = pos[0];
PosAyar[i][posY] = pos[1];
PosAyar[i][posZ] = pos[2];
PosAyar[i][posBakis] = pos[3];

PosAyar[i][Arac] = CreateVehicle(araba,pos[0],pos[1],pos[2],pos[3],-1,-1,-1,-1);
PutPlayerInVehicle(i,PosAyar[i][Arac],0);
}
xml_close(file);
return 1;
}

ATGOggy
17/10/2015, 12:32 PM
It's the problem of your PC.

Kaliber
17/10/2015, 02:40 PM
Well, actually you should write it like this:

#define STRING_LENG 2014
enum SpawnA
{
Arac,
Float:posX,
Float:posY,
Float:posZ,
Float:posBakis
};
new PosAyar[MAX_PLAYERS][SpawnA];



CMD:git(playerid,params[])
{
new XML:file = xml_open("DerbyMaps/race-[dd]Copy/Copy.map"),
string[STRING_LENG],
araba,
Float:pos[4],
i,
l=xml_get_int(file, "count(map/spawnpoint)")+1;
for(; i < l; i++) {
format(string, 1024, "map/spawnpoint[%d]/@vehicle", i);
araba = xml_get_int(file, string);

format(string, STRING_LENG, "map/spawnpoint[%d]/@posX", i);
pos[0] = xml_get_float(file, string);

format(string, STRING_LENG, "map/spawnpoint[%d]/@posY", i);
pos[1] = xml_get_float(file, string);

format(string, STRING_LENG, "map/spawnpoint[%d]/@posZ", i);
pos[2] = xml_get_float(file, string);

format(string, STRING_LENG, "map/spawnpoint[%d]/@rotZ", i);
pos[3] = xml_get_float(file, string);

PosAyar[i][Arac] = araba;
PosAyar[i][posX] = pos[0];
PosAyar[i][posY] = pos[1];
PosAyar[i][posZ] = pos[2];
PosAyar[i][posBakis] = pos[3];

PosAyar[i][Arac] = CreateVehicle(araba,pos[0],pos[1],pos[2],pos[3],-1,-1,-1,-1);
PutPlayerInVehicle(i,PosAyar[i][Arac],0);
}
xml_close(file);
return 1;
}

sampkinq
17/10/2015, 05:14 PM
Well, actually you should write it like this:

#define STRING_LENG 2014
enum SpawnA
{
Arac,
Float:posX,
Float:posY,
Float:posZ,
Float:posBakis
};
new PosAyar[MAX_PLAYERS][SpawnA];



CMD:git(playerid,params[])
{
new XML:file = xml_open("DerbyMaps/race-[dd]Copy/Copy.map"),
string[STRING_LENG],
araba,
Float:pos[4],
i,
l=xml_get_int(file, "count(map/spawnpoint)")+1;
for(; i < l; i++) {
format(string, 1024, "map/spawnpoint[%d]/@vehicle", i);
araba = xml_get_int(file, string);

format(string, STRING_LENG, "map/spawnpoint[%d]/@posX", i);
pos[0] = xml_get_float(file, string);

format(string, STRING_LENG, "map/spawnpoint[%d]/@posY", i);
pos[1] = xml_get_float(file, string);

format(string, STRING_LENG, "map/spawnpoint[%d]/@posZ", i);
pos[2] = xml_get_float(file, string);

format(string, STRING_LENG, "map/spawnpoint[%d]/@rotZ", i);
pos[3] = xml_get_float(file, string);

PosAyar[i][Arac] = araba;
PosAyar[i][posX] = pos[0];
PosAyar[i][posY] = pos[1];
PosAyar[i][posZ] = pos[2];
PosAyar[i][posBakis] = pos[3];

PosAyar[i][Arac] = CreateVehicle(araba,pos[0],pos[1],pos[2],pos[3],-1,-1,-1,-1);
PutPlayerInVehicle(i,PosAyar[i][Arac],0);
}
xml_close(file);
return 1;
}

The problem continues :(