GangZone Display Problem
#1


how to solve this problem?
Reply
#2

Create it correctly will solve this problem.. post your code.
Reply
#3

Quote:
Originally Posted by Matess
Посмотреть сообщение
Create it correctly will solve this problem.. post your code.
for(new i = 0; i < sizeof(TurfInfo); i++)
{
Turfs[i] = GangZoneCreate(TurfInfo[i][zMinX],TurfInfo[i][zMinY],TurfInfo[i][zMaxX],TurfInfo[i][zMaxY]);
}// Zones

public LoadTurfs()
{
new sql[200], sqldata[600], idx, arrCoords[20][100];
format(sql,sizeof(sql),"SELECT * FROM `turfsdata` ORDER BY `idz`");
mysql_query(sql);
mysql_store_result();
while(mysql_fetch_row_format(sqldata, "|"))
{
split(sqldata, arrCoords, '|');
format(TurfInfo[idx][zOwner],63, arrCoords[0]);
format(TurfInfo[idx][zColor],19, arrCoords[1]);
TurfInfo[idx][zMinX] = floatstr(arrCoords[2]);
TurfInfo[idx][zMinY] = floatstr(arrCoords[3]);
TurfInfo[idx][zMaxX] = floatstr(arrCoords[4]);
TurfInfo[idx][zMaxY] = floatstr(arrCoords[5]);
TurfInfo[idx][zMoney] = strval(arrCoords[6]);
TurfInfo[idx][zBombed] = strval(arrCoords[7]);
TurfInfo[idx][zDrugs] = strval(arrCoords[8]);
TurfInfo[idx][zMats] = strval(arrCoords[9]);
TurfInfo[idx][zID] = strval(arrCoords[10]);
TurfInfo[idx][zLevel] = strval(arrCoords[11]);
TurfInfo[idx][zTurfLevel] = strval(arrCoords[12]);
TurfInfo[idx][zX] = floatstr(arrCoords[13]);
TurfInfo[idx][zY] = floatstr(arrCoords[14]);
TurfInfo[idx][zZ] = floatstr(arrCoords[15]);
TurfInfo[idx][zGet] = strval(arrCoords[16]);
format(TurfInfo[idx][zName], 63, arrCoords[17]);
idx++;
}
return 1;
}
Reply
#4

Yeah but problem could be in coordinates so post them too.
Reply
#5

Quote:
Originally Posted by Matess
Посмотреть сообщение
Yeah but problem could be in coordinates so post them too.
Min X: -2668.91 Min Y: 410.124 Max X: -2743.56 Max Y: 340.968
Min X: -2327.63 Min Y: -1683.96 Max X: -2297.36 Max Y: -1570.35
Min X: 359.848 Min Y: -1816.59 Max X: 147.326 Max Y: -1745.13
Min X: 1546.3 Min Y: -1006.46 Max X: 1690.97 Max Y: -1148.39
Min X: 2196.35 Min Y: 985.716 Max X: 2090.6 Max Y: 1023.74
Min X: 443.462 Min Y: 2554.28 Max X: 85.3469 Max Y: 2475.9
Min X: 787.482 Min Y: 822.555 Max X: 459.258 Max Y: 890.878
Min X: 1531.09 Min Y: -1346.04 Max X: 1557.48 Max Y: -1369.68
Min X: 2808.66 Min Y: -2561.87 Max X: 2735.1 Max Y: -2339.49
Min X: -2136.81 Min Y: -224.804 Max X: -2191.14 Max Y: -270.631
Min X: -2547.07 Min Y: -352.504 Max X: -2459.71 Max Y: -297.111
Min X: -2136.28 Min Y: 310.205 Max X: -2036.74 Max Y: 200.975
Reply
#6

the problem is with the MySQL Code something like this : when you request min x , returns max x - like this.

EDIT: Never worked with MySQL!
Reply
#7

Quote:
Originally Posted by iFarbod
Посмотреть сообщение
the problem is with the MySQL Code something like this : when you request min x , returns max x - like this.

EDIT: Never worked with MySQL!
just get data and put in a variables
how come the problem is with the Mysql?
Reply
#8

No problem is for example here:

Min X: -2668.91 Min Y: 410.124 Max X: -2743.56 Max Y: 340.968

because -2668.91 > -2743.56 and this cause the bug and Y is also wrong

Check all your coords
Reply
#9

Minx can't be bigger than maxx - i had this error too, but i solved it. It's not MySQL fault - MySQL is very useful thing. With MySQL you can create things that with file saving is 100x harder (for example: toplists, selecting players not by name etc.)
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)