open.mp forum
[Server] Mysql R41 problem. - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Support (https://forum.open.mp/forumdisplay.php?fid=12)
--- Thread: [Server] Mysql R41 problem. (/showthread.php?tid=2280)



Mysql R41 problem. - kexy - 2022-02-27

Hi all! I need help With MYSQL R41-4! It prints out these errors and I don't know why it could be, what could be wrong?



[Image: mysql.png]



https://i.ibb.co/yfmNJwy/mysql.png


RE: Mysql R41 problem. - Banditul - 2022-02-28

Better post the errors as text. Your screnshot isn ot visible at all


RE: Mysql R41 problem. - kexy - 2022-02-28

Code:
[16:43:39] [ERROR] cache_get_value_name_int: value 'NULL' is not a number

[16:43:39] [ERROR] cache_get_value_name_int: value 'NULL' is not a number

[16:43:39] [ERROR] cache_get_value_name_int: value 'NULL' is not a number

[16:43:39] [ERROR] cache_get_value_name_int: value 'NULL' is not a number

[16:43:39] [ERROR] cache_get_value_name_int: value 'NULL' is not a number

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '6' (number of rows: '6')

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '7' (number of rows: '6')

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '8' (number of rows: '6')

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '9' (number of rows: '6')

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '10' (number of rows: '6')

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '11' (number of rows: '6')

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '12' (number of rows: '6')

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '13' (number of rows: '6')

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '14' (number of rows: '6')

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '15' (number of rows: '6')

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '16' (number of rows: '6')

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '17' (number of rows: '6')

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '18' (number of rows: '6')

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '19' (number of rows: '6')

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '20' (number of rows: '6')

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '21' (number of rows: '6')

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '22' (number of rows: '6')

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '23' (number of rows: '6')

[16:43:39] [ERROR] cache_get_value_name_int: invalid row index '24' (number of rows: '6')



Code:
for(new f = 0; f < cache_num_rows(); f)

{

new fact = cache_get_value_name_int(f, "id", fact);

FACTIONS[fact][FactionId] = fact;

cache_get_value_name(f, "FactionName", FACTIONS[fact][FactionName], 32);

cache_get_value_name(f, "FNameShort", FACTIONS[fact][FNameShort], 32);

FACTIONS[fact][FactionLeader] = cache_get_value_name_int(f, "Leader", FACTIONS[fact][FactionLeader]);

FACTIONS[fact][FactionLeaderRank] = cache_get_value_name_int(f, "LeaderRank", FACTIONS[fact][FactionLeaderRank]);

FACTIONS[fact][FactionUberLeaderRank] = cache_get_value_name_int(f, "UberLeaderRank", FACTIONS[fact][FactionUberLeaderRank]);

FACTIONS[fact][FactionSpawn1][0] = cache_get_value_name_float(f, "Spawn1X", FACTIONS[fact][FactionSpawn1][0]);

FACTIONS[fact][FactionSpawn1][1] = cache_get_value_name_float(f, "Spawn1Y", FACTIONS[fact][FactionSpawn1][1]);

FACTIONS[fact][FactionSpawn1][2] = cache_get_value_name_float(f, "Spawn1Z", FACTIONS[fact][FactionSpawn1][2]);

FACTIONS[fact][FactionSpawn1][3] = cache_get_value_name_float(f, "Spawn1A", FACTIONS[fact][FactionSpawn1][3]);

FACTIONS[fact][FactionSpawn2][0] = cache_get_value_name_float(f, "Spawn2X", FACTIONS[fact][FactionSpawn2][0]);

FACTIONS[fact][FactionSpawn2][1] = cache_get_value_name_float(f, "Spawn2Y", FACTIONS[fact][FactionSpawn2][1]);

FACTIONS[fact][FactionSpawn2][2] = cache_get_value_name_float(f, "Spawn2Z", FACTIONS[fact][FactionSpawn2][2]);

FACTIONS[fact][FactionSpawn2][3] = cache_get_value_name_float(f, "Spawn2A", FACTIONS[fact][FactionSpawn2][3]);

FACTIONS[fact][FactionSpawn3][0] = cache_get_value_name_float(f, "Spawn3X", FACTIONS[fact][FactionSpawn3][0]);

FACTIONS[fact][FactionSpawn3][1] = cache_get_value_name_float(f, "Spawn3Y", FACTIONS[fact][FactionSpawn3][1]);

FACTIONS[fact][FactionSpawn3][2] = cache_get_value_name_float(f, "Spawn3Z", FACTIONS[fact][FactionSpawn3][2]);

FACTIONS[fact][FactionSpawn3][3] = cache_get_value_name_float(f, "Spawn3A", FACTIONS[fact][FactionSpawn3][3]);

FACTIONS[fact][FactionSpawn4][0] = cache_get_value_name_float(f, "Spawn4X", FACTIONS[fact][FactionSpawn4][0]);

FACTIONS[fact][FactionSpawn4][1] = cache_get_value_name_float(f, "Spawn4Y", FACTIONS[fact][FactionSpawn4][1]);

FACTIONS[fact][FactionSpawn4][2] = cache_get_value_name_float(f, "Spawn4Z", FACTIONS[fact][FactionSpawn4][2]);

FACTIONS[fact][FactionSpawn4][3] = cache_get_value_name_float(f, "Spawn4A", FACTIONS[fact][FactionSpawn4][3]);

FACTIONS[fact][FactionSpawn5][0] = cache_get_value_name_float(f, "Spawn5X", FACTIONS[fact][FactionSpawn5][0]);

FACTIONS[fact][FactionSpawn5][1] = cache_get_value_name_float(f, "Spawn5Y", FACTIONS[fact][FactionSpawn5][1]);

FACTIONS[fact][FactionSpawn5][2] = cache_get_value_name_float(f, "Spawn5Z", FACTIONS[fact][FactionSpawn5][2]);

FACTIONS[fact][FactionSpawn5][3] = cache_get_value_name_float(f, "Spawn5A", FACTIONS[fact][FactionSpawn5][3]);

FACTIONS[fact][FactionSpawnVW][0] = cache_get_value_name_int(f, "Spawn1VW", FACTIONS[fact][FactionSpawnVW][0]);

FACTIONS[fact][FactionSpawnVW][1] = cache_get_value_name_int(f, "Spawn2VW", FACTIONS[fact][FactionSpawnVW][1]);

FACTIONS[fact][FactionSpawnVW][2] = cache_get_value_name_int(f, "Spawn3VW", FACTIONS[fact][FactionSpawnVW][2]);

FACTIONS[fact][FactionSpawnVW][3] = cache_get_value_name_int(f, "Spawn4VW", FACTIONS[fact][FactionSpawnVW][3]);

FACTIONS[fact][FactionSpawnVW][4] = cache_get_value_name_int(f, "Spawn5VW", FACTIONS[fact][FactionSpawnVW][4]);

FACTIONS[fact][FactionSpawnInt][0] = cache_get_value_name_int(f, "Spawn1Int", FACTIONS[fact][FactionSpawnInt][0]);

FACTIONS[fact][FactionSpawnInt][1] = cache_get_value_name_int(f, "Spawn2Int", FACTIONS[fact][FactionSpawnInt][1]);

FACTIONS[fact][FactionSpawnInt][2] = cache_get_value_name_int(f, "Spawn3Int", FACTIONS[fact][FactionSpawnInt][2]);

FACTIONS[fact][FactionSpawnInt][3] = cache_get_value_name_int(f, "Spawn4Int", FACTIONS[fact][FactionSpawnInt][3]);

FACTIONS[fact][FactionSpawnInt][4] = cache_get_value_name_int(f, "Spawn5Int", FACTIONS[fact][FactionSpawnInt][4]);

cache_get_value_name(f, "Spawn1Name", FACTIONS[fact][FactionSpawn1Name], 32);

cache_get_value_name(f, "Spawn2Name", FACTIONS[fact][FactionSpawn2Name], 32);

cache_get_value_name(f, "Spawn3Name", FACTIONS[fact][FactionSpawn3Name], 32);

cache_get_value_name(f, "Spawn4Name", FACTIONS[fact][FactionSpawn4Name], 32);

cache_get_value_name(f, "Spawn5Name", FACTIONS[fact][FactionSpawn5Name], 32);

FACTIONS[fact][FactionIsGang] = cache_get_value_name_int(f, "IsGang", FACTIONS[fact][FactionIsGang]);

FACTIONS[fact][FactionIsActive] = cache_get_value_name_int(f, "IsActive", FACTIONS[fact][FactionIsActive]);

FACTIONS[fact][FactionBankBalance] = cache_get_value_name_int(f, "BankBalance", FACTIONS[fact][FactionBankBalance]);

FACTIONS[fact][FactionRadioChannel] = cache_get_value_name_int(f, "RadioChannel", FACTIONS[fact][FactionRadioChannel]);

FACTIONS[fact][FactionPayDayTax] = cache_get_value_name_int(f, "PayDayTax", FACTIONS[fact][FactionPayDayTax]);

FACTIONS[fact][FactionWeaponTime] = cache_get_value_name_int(f, "WeaponTime", FACTIONS[fact][FactionWeaponTime]);



new jbstring[10];

for(new i; i != MAX_FACTION_DOORS; i) {

format(jbstring, 10, "door%i", i);

FACTIONS[fact][FactionDoors][i] = cache_get_value_name_int(i, jbstring, FACTIONS[fact][FactionDoors][i]) - 1;

}



for(new x = 0; x < 15; x)

{

format(tgstr, 12, "RankName%i", x  1);

cache_get_value_name(f, tgstr, FactionRanks[fact][x], 32);



format(tgstr, 12, "Skin%i", x);

FACTIONS[fact][FactionSkins][x] = cache_get_value_name_int(x, tgstr, FACTIONS[fact][FactionSkins][x]);



format(tgstr, 12, "Rank%iPay", x  1);

FACTIONS[fact][FactionRankPay][x] = cache_get_value_name_int(x, tgstr, FACTIONS[fact][FactionRankPay][x]);

}



GetFMOTD(fact);

}



RE: Mysql R41 problem. - Radical - 2022-03-01

About this:?

Code:
cache_get_value_name_int: value 'NULL' is not a number



Set a default number for integer columns.



PHP Code:
ALTER TABLE `table_nameALTER COLUMN `column_nameSET DEFAULT '0'