01.01.2017, 12:21
This is commands always show warning sscanf...
can help?
can help?
PHP код:
CMD:editbiz(playerid, params[])
{
new Usage[128], id, string[ 128 ];
if( sscanf( params, "dz", id, Usage) )
{
if( PlayerInfo[playerid][pAdmin] >= 9)
{
SendClientMessage( playerid, COLOR_WHITE, "USAGE: /movebiz [businessid] [name]" );
SendClientMessage( playerid, COLOR_GREY, "Available Names: Exterior, Interior" );
}
}
else
{
if( PlayerInfo[playerid][pAdmin] >= 9)
{
format( string, sizeof( string ), "Businesses/Business_%d.ini", id);
if(strcmp(Usage, "exterior", true) == 0 )
{
if(!dini_Exists(string))
{
SendClientMessage( playerid, COLOR_GREY, "Invalid Business ID!" );
return 1;
}
else
{
BizzInfo[id][bExteriorID] = GetPlayerInterior( playerid );
GetPlayerPos( playerid, BizzInfo[id][bEntranceX], BizzInfo[id][bEntranceY], BizzInfo[id][bEntranceZ]);
if(BizzInfo[id][bOwned] == 1)
{
new i = id;
DestroyDynamicPickup(BizzInfo[id][bPickupID]);
DestroyDynamic3DTextLabel(business1[id]);
BizzInfo[id][bPickupID] = CreateDynamicPickup(19133, 23, BizzInfo[id][bEntranceX], BizzInfo[id][bEntranceY], BizzInfo[id][bEntranceZ], 0, -1, -1, 150.0 );
format(string, sizeof(string), "{FF0000}[%s]\n"YELLOW_E"Owner: %s\n"GREEN_E"%s\n"YELLOW_E"Status : %s\n"GREEN_E"Bizz ID: %d",BT(id), BizzInfo[i][bOwner], BizzInfo[i][bMessage],BL(id),i);
business1[id] = CreateDynamic3DTextLabel(string, COLOR_WHITE, BizzInfo[id][bEntranceX], BizzInfo[id][bEntranceY], BizzInfo[id][bEntranceZ]+0.75,10.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,0,-1,-1, 100.0);
}
else
{
DestroyDynamicPickup(BizzInfo[id][bPickupID]);
DestroyDynamic3DTextLabel(business2[id]);
BizzInfo[id][bPickupID] = CreateDynamicPickup(19133, 23, BizzInfo[id][bEntranceX], BizzInfo[id][bEntranceY], BizzInfo[id][bEntranceZ], 0, -1, -1, 150.0 );
format(string, sizeof(string), "{FF0000}[%s Dijual]\n"YELLOW_E"Harga: $%d\n"GREEN_E"Level: %d\n"YELLOW_E"Bizz ID: %d\n((/buybiz)) ", BT(id),BizzInfo[id][bBuyPrice],BizzInfo[id][bLevelNeeded], id);
business2[id] = CreateDynamic3DTextLabel(string, COLOR_WHITE, BizzInfo[id][bEntranceX], BizzInfo[id][bEntranceY], BizzInfo[id][bEntranceZ]+0.75,10.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,0,-1,-1, 100.0);
}
SendClientMessage( playerid, COLOR_WHITE, "Exterior changed!" );
SaveBusiness(id);
}
}
else if(strcmp(Usage, "interior", true) == 0 )
{
if(!dini_Exists(string))
{
SendClientMessage( playerid, COLOR_GREY, "Invalid Business ID!" );
return 1;
}
else
{
GetPlayerPos( playerid, BizzInfo[id][bExitX], BizzInfo[id][bExitY], BizzInfo[id][bExitZ]);
BizzInfo[id][bInteriorID] = GetPlayerInterior( playerid );
SendClientMessage( playerid, COLOR_WHITE, "Interior changed!" );
SaveBusiness(id);
}
}
}
}
return 1;
}
PHP код:
[03:13:55] [zcmd] [Dandy Corleone]: /editbiz
[03:14:05] [zcmd] [Dandy Corleone]: /editbiz 41 exterior
[03:14:05] sscanf warning: 'z' is deprecated, consider using 'S' instead.
[03:14:05] sscanf warning: No default value found.
[03:14:05] sscanf warning: Strings without a length are deprecated, please add a destination size.
[03:14:14] [zcmd] [Dandy Corleone]: /editbiz 41 exterior
[03:14:14] sscanf warning: 'z' is deprecated, consider using 'S' instead.
[03:14:14] sscanf warning: No default value found.
[03:14:14] sscanf warning: Strings without a length are deprecated, please add a destination size.
[03:14:20] [zcmd] [Dandy Corleone]: /clearbiz
[03:14:23] [zcmd] [Dandy Corleone]: /clearbiz 0 3