Streamer_GetIntData: invalid id...
#1

console spams this sometimes, why?
Reply
#2

Post the code where Streamer_GetIntData is used in your script.
Reply
#3

Quote:
Originally Posted by Konstantinos
View Post
Post the code where Streamer_GetIntData is used in your script.
Code:
stock UpdatePlayerBleeds(playerid)
{
	if(IsPlayerFalling(playerid) || IsPlayerJumping(playerid) || IsPlayerInWater(playerid))
		return false;
	new
			Float:pos[3];
	GetDynamicObjectPos(PlayerData[playerid][BleedObject][0], pos[0], pos[1], pos[2]);
	if(!IsPlayerInRangeOfPoint(playerid, PLAYER_BLEEDING_RANGE, pos[0], pos[1], (pos[2] + 0.99)))
	{
		new
				a = (PlayerData[playerid][Bleeding] - 1);
		while(a >= 0)
		{
			if((a - 1) == -1)
			{
				GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
				pos[2] -= 0.99;
			}
			else
				GetDynamicObjectPos(PlayerData[playerid][BleedObject][a - 1], pos[0], pos[1], pos[2]);
			SetDynamicObjectPos(PlayerData[playerid][BleedObject][a], pos[0], pos[1], pos[2]);
			if(GetPlayerInterior(playerid) != Streamer_GetIntData(STREAMER_TYPE_OBJECT, PlayerData[playerid][BleedObject][a], E_STREAMER_INTERIOR_ID))
				Streamer_SetIntData(STREAMER_TYPE_OBJECT, PlayerData[playerid][BleedObject][a], E_STREAMER_INTERIOR_ID, GetPlayerInterior(playerid));
			if(GetPlayerVirtualWorld(playerid) != Streamer_GetIntData(STREAMER_TYPE_OBJECT, PlayerData[playerid][BleedObject][a], E_STREAMER_WORLD_ID))
				Streamer_SetIntData(STREAMER_TYPE_OBJECT, PlayerData[playerid][BleedObject][a], E_STREAMER_WORLD_ID, GetPlayerVirtualWorld(playerid));
			a--;
		}
	}
	return true;
}
Reply
#4

Before setting the object position and check about interior/virtual word, check if the object is valid:
pawn Code:
if (!IsValidDynamicObject(PlayerData[playerid][BleedObject][a])) continue;

// code..
Reply
#5

Quote:
Originally Posted by Konstantinos
View Post
Before setting the object position and check about interior/virtual word, check if the object is valid:
pawn Code:
if (!IsValidDynamicObject(PlayerData[playerid][BleedObject][a])) continue;

// code..
Thanks! do you know how to detect if a object over the vehicle? I'm making a trunk system, people stores their weapon into trunk before spawn a object and they have to place this object inside the car, one problem, it's hard to detect if this object goes to sky or far from car. can you give me a framework? thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)