SA-MP Forums Archive
error 035: argument type mismatch (argument 2) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error 035: argument type mismatch (argument 2) (/showthread.php?tid=664890)



error 035: argument type mismatch (argument 2) - rOps - 14.03.2019

Hello, maybe you can tell me what's wrong with this code? Because I can't find a mistake

Код HTML:
new String[30];

for(new i = 0; i < MAX_INVENTORY_SLOTS; i ++)
{
	format(String, sizeof(String), "InventoryItemID_%d", i);
	cache_get_value_int(0, String, InventorySystem[playerid][i][ItemID]);

	format(String, sizeof(String), "InventoryItemAmmount_%d", i);
	cache_get_value_int(0, String, InventorySystem[playerid][i][ItemAmmount]);
}
2 same warnings on these lines:

cache_get_value_int(0, String, InventorySystem[playerid][i][ItemID]);
cache_get_value_int(0, String, InventorySystem[playerid][i][ItemAmmount]);


Re: error 035: argument type mismatch (argument 2) - Kaliber - 15.03.2019

It depends, which mysql version you are using.

Maybe update to the newest, then this should be correct


Re: error 035: argument type mismatch (argument 2) - rOps - 15.03.2019

It's R41-4.

But I've changed to cache_get_value_name_int and now is ok.