Business Name doesn't load - MySQL
#1

pawn Code:
CMD:bprice(playerid, params[])
{
    new string[128], bid, price, query[400];
    if(PlayerInfo[playerid][Admin] >= 5)
    {
        if(sscanf(params, "id", bid,price)) return SendClientMessage(playerid, COLOR_RED, "[SERVER] /bprice bid price");
       
        BusinessInfo[bid][Price] = price;
        format(string, sizeof(string), "Business ID: "COL_BLUE"%i   "COL_WHITE"Business Price: "COL_BLUE"%d", bid, price);
        SendClientMessage(playerid, COLOR_WHITE, string);
       
        format(query, sizeof(query), "UPDATE Business SET Price = %d  WHERE ID = %i", BusinessInfo[bid][Price], bid);
        mysql_query(query);
       
        DestroyDynamic3DTextLabel(BusinessInfo[bid][LabelID]);
        format(string, sizeof(string), "Name: %s \nPrice: %d\nEnter by using 'Crouch'", BusinessInfo[bid][Name],BusinessInfo[bid][Price]);
        printf("Name %s Price %d", BusinessInfo[bid][Name], BusinessInfo[bid][Price]);
        BusinessInfo[bid][LabelID] = CreateDynamic3DTextLabel(string, COLOR_WHITE, BusinessInfo[bid][Posx],BusinessInfo[bid][Posy],BusinessInfo[bid][Posz], 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0);

    }
    else
    {
        InfoBoxForPlayer(playerid, "You aren't an admin, or high enough level.");
    }
    return 1;
}
The name comes out as " " just a space, yet the name loads when starting the server, how can I fix this? Thanks in advance.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)