sscanf issue
#1

everytime i type enter or exit i get a sscanf warning.


Code:
[08:55:31] sscanf warning: No default value found.
Code:
CMD:enter(playerid, params[])
{
	for(new i = 0; i < sizeof(HouseInfo); i++)
	{
		if (IsPlayerInRangeOfPoint(playerid,3,HouseInfo[i][hExteriorX], HouseInfo[i][hExteriorY], HouseInfo[i][hExteriorZ])) {
			if(PlayerInfo[playerid][pPhousekey] == i || PlayerInfo[playerid][pPhousekey2] == i || HouseInfo[i][hLock] == 0 || PlayerInfo[playerid][pRenting] == i) {
				SetPlayerInterior(playerid,HouseInfo[i][hHInteriorWorld]);
				PlayerInfo[playerid][pInt] = HouseInfo[i][hHInteriorWorld];
				PlayerInfo[playerid][pLocal] = i+6000;
				PlayerInfo[playerid][pVW] = i+6000;
				SetPlayerVirtualWorld(playerid, i+6000);
				if(HouseInfo[i][hCustomInterior] == 1)
				{
					TogglePlayerControllable(playerid, 0);
				}
				SetPlayerPos(playerid,HouseInfo[i][hInteriorX],HouseInfo[i][hInteriorY],HouseInfo[i][hInteriorZ]);
				SetPlayerFacingAngle(playerid,HouseInfo[i][hInteriorA]);
				SetCameraBehindPlayer(playerid);
				GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1);
				Streamer_UpdateEx(playerid, HouseInfo[i][hInteriorX],HouseInfo[i][hInteriorY],HouseInfo[i][hInteriorZ]);
			}
			else
			{
				GameTextForPlayer(playerid, "~r~Locked", 5000, 1);
			}
			return 1;
		}
	}
	EnteredInterior[playerid] = true;
	return 1;
}


Code:
CMD:exit(playerid, params[])
{
	for(new i = 0; i <  sizeof(HouseInfo); i++) {
		if (IsPlayerInRangeOfPoint(playerid,3,HouseInfo[i][hInteriorX], HouseInfo[i][hInteriorY], HouseInfo[i][hInteriorZ]) && PlayerInfo[playerid][pVW] == i+6000) {
			SetPlayerInterior(playerid,0);
			PlayerInfo[playerid][pInt] = 0;
			PlayerInfo[playerid][pLocal] = 255;
			if(HouseInfo[i][hCustomExterior]) {
				TogglePlayerControllable(playerid, 0);
			}
			SetPlayerPos(playerid,HouseInfo[i][hExteriorX],HouseInfo[i][hExteriorY],HouseInfo[i][hExteriorZ]);
			SetPlayerFacingAngle(playerid, HouseInfo[i][hExteriorA]);
			SetCameraBehindPlayer(playerid);
			SetPlayerVirtualWorld(playerid, 0);
			PlayerInfo[playerid][pVW] = 0;
			return Streamer_UpdateEx(playerid, HouseInfo[i][hExteriorX],HouseInfo[i][hExteriorY],HouseInfo[i][hExteriorZ]);
		}
	}
	EnteredInterior[playerid] = false;
	return 1;
}
Reply
#2

Quote:
Originally Posted by ******
View Post
  • sscanf warning: Empty default values.
An optional specifier has been set as (for example):

Code:
I()
Instead of:

Code:
I(42)
This does not apply to strings as they can be legitimately empty.
Make sure you specified a value to the string anywhere in your code.
Reply
#3

dont really understand that.
Reply
#4

I can't see any sscanf line in your code man lol. Anyway, when you use "I" you should add () which contain default value to be taken by variable
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)