sscanf warning: Strings without a length are deprecated, please add a destination size.
#1

Код:
    new string[128], Float:heal, price;
    if(sscanf(params, "sfi", string, heal, price))
    {
        SendClientMessage(playerid, COLOR_RED, "? /createsprunk [vendingmachine] [heal bonus] [price]");
        return SendClientMessage(playerid, COLOR_RED, "  Type /vendingmachines");
    }
    for(new int = 0; int < sizeof(VendingMachines); int++)
    {
        if(strcmp(string, VendingMachines[int][vmName], true))
        for(new i = 0; i < MAX_VENDING_MACHINES; i++)
        {
			GetPlayerPos(playerid, SprunkMachines[i][SprunkObjectX1], SprunkMachines[i][SprunkObjectY1], SprunkMachines[i][SprunkObjectZ]);
			GetPlayerFacingAngle(playerid, SprunkMachines[i][SprunkObjectA]);
			SprunkMachines[i][SprunkHeal] = heal;
			SprunkMachines[i][SprunkPrice] = price;
			SprunkMachines[i][SprunkModelID] = VendingMachines[int][vmModel];
			SprunkMachines[i][SprunkCreated] = true;
	        new Float:X, Float:Y;
			SprunkMachines[i][SprunkObjectID] = CreateDynamicObject(SprunkMachines[i][SprunkModelID], SprunkMachines[i][SprunkObjectX1], SprunkMachines[i][SprunkObjectY1], SprunkMachines[i][SprunkObjectZ], 0.0, 0.0, SprunkMachines[i][SprunkObjectA]-180);
			X = SprunkMachines[i][SprunkObjectX1], Y = SprunkMachines[i][SprunkObjectY1];
			GetXYInFrontOfSprunk(X, Y, SprunkMachines[i][SprunkObjectA]);
			SprunkMachines[i][SprunkPickupID] = CreateDynamicPickup(1274, 23, X, Y, SprunkMachines[i][SprunkObjectZ]);
			SprunkMachines[i][SprunkObjectX2] = X, SprunkMachines[i][SprunkObjectY2] = Y;
			SprunkMachines[i][SprunkCreated] = true;
What is wrong with the code
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)