[ERROR] cache_get_field_content_int - invalid datatype
#1

Guys like the Title my Problem is MySQL really i dont know how to fix.
Can u guys help me.

These are my Errors from mysql_log:
Quote:

[15:17:33 06/26/18] [WARNING] CMySQLHandle::Create - connection already exists
[15:17:33 06/26/18] [ERROR] cache_get_field_content_int - invalid datatype
[15:17:33 06/26/18] [ERROR] cache_get_field_content_int - invalid datatype
[15:17:33 06/26/18] [ERROR] cache_get_field_content_int - invalid datatype
[15:17:33 06/26/18] [ERROR] cache_get_field_content_int - invalid datatype
[15:17:33 06/26/18] [ERROR] cache_get_field_content_int - invalid datatype
[15:17:33 06/26/18] [ERROR] cache_get_field_content_int - invalid datatype
[15:18:11 06/26/18] [ERROR] cache_get_field_content_int - invalid datatype
[15:23:18 06/26/18] [ERROR] cache_get_field_content_int - invalid datatype
[15:23:18 06/26/18] [ERROR] cache_get_field_content_int - invalid datatype
[15:23:18 06/26/18] [ERROR] cache_get_field_content_int - invalid datatype
[15:23:18 06/26/18] [ERROR] cache_get_field_content_int - invalid datatype
[15:23:18 06/26/18] [ERROR] cache_get_field_content_int - invalid datatype
[15:24:58 06/26/18] [ERROR] cache_get_field_content_int - invalid datatype

and i use the Cache_get_field_content_int here on script: there are much lines i have copied 2 examples but the others are same like These both...
Quote:

forward MDC_PlayerLookup(playerid, username[]);
public MDC_PlayerLookup(playerid, username[])
{
if(!cache_get_row_count(connectionID))
{
SendClientMessage(playerid, COLOR_GREY, "That player doesn't exist and therefore has no information to view.");
ShowPlayerDialog(playerid, DIALOG_PLAYERLOOKUP, DIALOG_STYLE_INPUT, "Player lookup", "Enter the full name of the player to lookup:", "Submit", "Cancel");
}
else
{
new string[512];

PlayerInfo[playerid][pSelected] = cache_get_field_content_int(0, "uid");

format(string, sizeof(string), "Name: %s\nGender: %s\nAge: %i years old\nCrimes commited: %i\nTimes arrested: %i\nWanted level: %i/6\nDrivers license: %s", username, (cache_get_field_content_int(0, "gender") == 2) ? ("Female") : ("Male"), cache_get_field_content_int(0, "age"), cache_get_field_content_int(0, "crimes"), cache_get_field_content_int(0, "arrested"), cache_get_field_content_int(0, "wantedlevel"), cache_get_field_content_int(0, "carlicense") ? ("Yes") : ("No"));
ShowPlayerDialog(playerid, DIALOG_MDCPLAYER1, DIALOG_STYLE_MSGBOX, "Player lookup", string, "Options", "Cancel");
}
}

Quote:

forward OnPlayerSpawnVehicle(playerid, parked);
public OnPlayerSpawnVehicle(playerid, parked)
{


if(!cache_get_row_count(connectionID))
{
SendClientMessage(playerid, COLOR_GREY, "The slot specified contains no valid vehicle which you can spawn.");
}
else
{
for(new i = 0; i < MAX_VEHICLES; i ++)
{
if(IsValidVehicle(i) && VehicleInfo[i][vID] == cache_get_field_content_int(0, "id"))
{
return SendClientMessage(playerid, COLOR_GREY, "This vehicle is spawned already. /findcar to track it.");
}
}

if(GetSpawnedVehicles(playerid) >= MAX_SPAWNED_VEHICLES)
{
return SendClientMessageEx(playerid, COLOR_GREY, "You can't have more than %i vehicles spawned at a time.", MAX_SPAWNED_VEHICLES);
}

new
modelid = cache_get_field_content_int(0, "modelid"),
Float = cache_get_field_content_float(0, "pos_x"),
Float:y = cache_get_field_content_float(0, "pos_y"),
Float:z = cache_get_field_content_float(0, "pos_z"),
Float:a = cache_get_field_content_float(0, "pos_a"),
color1 = cache_get_field_content_int(0, "color1"),
color2 = cache_get_field_content_int(0, "color2"),
vehicleid;

vehicleid = CreateVehicle(modelid, x, y, z, a, color1, color2, -1);

if(vehicleid != INVALID_VEHICLE_ID)
{
ResetVehicle(vehicleid);

cache_get_field_content(0, "owner", VehicleInfo[vehicleid][vOwner], connectionID, MAX_PLAYER_NAME);
cache_get_field_content(0, "plate", VehicleInfo[vehicleid][vPlate], connectionID, 32);

VehicleInfo[vehicleid][vID] = cache_get_field_content_int(0, "id");
VehicleInfo[vehicleid][vOwnerID] = cache_get_field_content_int(0, "ownerid");
VehicleInfo[vehicleid][vPrice] = cache_get_field_content_int(0, "price");
VehicleInfo[vehicleid][vTickets] = cache_get_field_content_int(0, "tickets");
VehicleInfo[vehicleid][vLocked] = cache_get_field_content_int(0, "locked");
VehicleInfo[vehicleid][vHealth] = cache_get_field_content_float(0, "health");
VehicleInfo[vehicleid][vPaintjob] = cache_get_field_content_int(0, "paintjob");
VehicleInfo[vehicleid][vInterior] = cache_get_field_content_int(0, "interior");
VehicleInfo[vehicleid][vWorld] = cache_get_field_content_int(0, "world");
VehicleInfo[vehicleid][vNeon] = cache_get_field_content_int(0, "neon");
VehicleInfo[vehicleid][vNeonEnabled] = cache_get_field_content_int(0, "neonenabled");
VehicleInfo[vehicleid][vTrunk] = cache_get_field_content_int(0, "trunk");
VehicleInfo[vehicleid][vMods][0] = cache_get_field_content_int(0, "mod_1");
VehicleInfo[vehicleid][vMods][1] = cache_get_field_content_int(0, "mod_2");
VehicleInfo[vehicleid][vMods][2] = cache_get_field_content_int(0, "mod_3");
VehicleInfo[vehicleid][vMods][3] = cache_get_field_content_int(0, "mod_4");
VehicleInfo[vehicleid][vMods][4] = cache_get_field_content_int(0, "mod_5");
VehicleInfo[vehicleid][vMods][5] = cache_get_field_content_int(0, "mod_6");
VehicleInfo[vehicleid][vMods][6] = cache_get_field_content_int(0, "mod_7");
VehicleInfo[vehicleid][vMods][7] = cache_get_field_content_int(0, "mod_8");
VehicleInfo[vehicleid][vMods][8] = cache_get_field_content_int(0, "mod_9");
VehicleInfo[vehicleid][vMods][9] = cache_get_field_content_int(0, "mod_10");
VehicleInfo[vehicleid][vMods][10] = cache_get_field_content_int(0, "mod_11");
VehicleInfo[vehicleid][vMods][11] = cache_get_field_content_int(0, "mod_12");
VehicleInfo[vehicleid][vMods][12] = cache_get_field_content_int(0, "mod_13");
VehicleInfo[vehicleid][vMods][13] = cache_get_field_content_int(0, "mod_14");
VehicleInfo[vehicleid][vCash] = cache_get_field_content_int(0, "cash");
VehicleInfo[vehicleid][vMaterials] = cache_get_field_content_int(0, "materials");
VehicleInfo[vehicleid][vWeed] = cache_get_field_content_int(0, "weed");
VehicleInfo[vehicleid][vCocaine] = cache_get_field_content_int(0, "cocaine");
VehicleInfo[vehicleid][vMeth] = cache_get_field_content_int(0, "meth");
VehicleInfo[vehicleid][vPainkillers] = cache_get_field_content_int(0, "painkillers");
VehicleInfo[vehicleid][vWeapons][0] = cache_get_field_content_int(0, "weapon_1");
VehicleInfo[vehicleid][vWeapons][1] = cache_get_field_content_int(0, "weapon_2");
VehicleInfo[vehicleid][vWeapons][2] = cache_get_field_content_int(0, "weapon_3");
VehicleInfo[vehicleid][vHPAmmo] = cache_get_field_content_int(0, "hpammo");
VehicleInfo[vehicleid][vPoisonAmmo] = cache_get_field_content_int(0, "poisonammo");
VehicleInfo[vehicleid][vFMJAmmo] = cache_get_field_content_int(0, "fmjammo");
VehicleInfo[vehicleid][vGang] = -1;
VehicleInfo[vehicleid][vFactionType] = FACTION_NONE;
VehicleInfo[vehicleid][vJob] = JOB_NONE;
VehicleInfo[vehicleid][vRespawnDelay] = -1;
VehicleInfo[vehicleid][vModel] = modelid;
VehicleInfo[vehicleid][vPosX] = x;
VehicleInfo[vehicleid][vPosY] = y;
VehicleInfo[vehicleid][vPosZ] = z;
VehicleInfo[vehicleid][vPosA] = a;
VehicleInfo[vehicleid][vColor1] = color1;
VehicleInfo[vehicleid][vColor2] = color2;
VehicleInfo[vehicleid][vObjects][0] = INVALID_OBJECT_ID;
VehicleInfo[vehicleid][vObjects][1] = INVALID_OBJECT_ID;
VehicleInfo[vehicleid][vTimer] = -1;

vehicleFuel[vehicleid] = cache_get_field_content_int(0, "fuel");
adminVehicle{vehicleid} = false;
ReloadVehicle(vehicleid);

if(!parked)
{
SendClientMessageEx(playerid, COLOR_AQUA, "You have spawned your {FF6347}%s{33CCFF} which is located in {F7A763}%s{33CCFF}. /findcar to track it.", GetVehicleName(vehicleid), GetVehicleZoneName(vehicleid));
}
}
}

return 1;
}

Reply
#2

use MySQL R39 PLUGIN AND INCLUDE to fix the errors..
Reply
#3

What does this error mean??

It means that you're trying to get data from a specific column as an integer while it's not an integer, or the column isn't defined as integer, You can check around the columns using this function and see if all is setup well or not..
Reply
#4

Quote:
Originally Posted by JasonRiggs
Посмотреть сообщение
What does this error mean??

It means that you're trying to get data from a specific column as an integer while it's not an integer, or the column isn't defined as integer, You can check around the columns using this function and see if all is setup well or not..
damn, lol just read the error nothing further, thought these are pawno errors xD
Reply
#5

Quote:
Originally Posted by div
Посмотреть сообщение
use MySQL R39 PLUGIN AND INCLUDE to fix the errors..
Allready done, it changes Nothing have the same error
Reply
#6

check database column if it INT(something) you need use in pawno cache_get_field_content_int();
if its VARCHAR(somethin) or TEXT or DATE or TIMESTAMP you need use in pawno cache_get_field_content(...);
if its FLOAT you need use in pawno cache_get_field_content_float(...);
Reply
#7

Quote:
Originally Posted by Slawi
Посмотреть сообщение
check database column if it INT(something) you need use in pawno cache_get_field_content_int();
if its VARCHAR(somethin) or TEXT or DATE or TIMESTAMP you need use in pawno cache_get_field_content(...);
if its FLOAT you need use in pawno cache_get_field_content_float(...);
allthing Right with int and float i checked all ….
when i start my Server i get this Errors from mysql_log 17 times at the same second…
only at starting the Server from host...

i checked all database column and maked the same as pawno the _int(..)
Reply
#8

Quote:
Originally Posted by div
Посмотреть сообщение
damn, lol just read the error nothing further, thought these are pawno errors xD
Why did you rush then? Dont rep hunt this much. Providing false information will result in wastage of time and will probably wreck the script more.


Anyways, show where did you fire the query.
Reply
#9

Quote:
Originally Posted by Suikast
Посмотреть сообщение
allthing Right with int and float i checked all ….
when i start my Server i get this Errors from mysql_log 17 times at the same second…
only at starting the Server from host...

i checked all database column and maked the same as pawno the _int(..)
maybe no data found

are you sure you uploaded your SQL script in phpmyadmin
or are you sure your server connected with the correct database
Reply
#10

ye guys all uploaded i found the error exact its…
at mysql database User>Table>Setup>Standard if its definiert 1 it dont saves ingame the account...
but if i go Users>myAccount and there at Setup definiert 0 then it saves all ingame and allthing good...

but the Problem is now User>Table>Setup>Standard set definiert 0 if its like this like on account for all acounts you will join game but u wont spawn at the Right spawn and the Server dont ask u for gender age and all...

Idk what to do...
sorry for bad english
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)