OnPlayerPickup and for loops? Good combination or not?
#7

Hmmmm put print() debug messages in like this....

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    print("OnPlayerPickUpPickup::Level 1");
    for(new i; i < sizeof(DealerShips); i++)
    {
        if(pickupid == DealerShips[i][PickupID])
        {
            print("OnPlayerPickUpPickup::Level 2");
            new VehiclesString[250];
            for(new d; d < sizeof(DealerShipVehicles); d++)
            {
                if(DealerShipVehicles[d][DealershipNumber] == DealerShips[i][DealerShipID])
                {
                    print("OnPlayerPickUpPickup::Level 3");
                    new vModel = DealerShipVehicles[d][VModel];
                    format(VehiclesString, sizeof(VehiclesString), "%s(%d)\n",VehicleFriendlyNames[vModel-400],DealerShipVehicles[d][VPrice]);
                }
            }
            print("OnPlayerPickUpPickup::Level 4");
            ShowPlayerDialog(playerid, dealership1, DIALOG_STYLE_LIST, DealerShips[i][DealershipName], VehiclesString, "Buy", "Cancel");
            return 1; // this will do it basically?
        }
    }
    return 1;
}
That will show you exactly where your code is stopping.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)