Only first letter, instead of the whole word HELP please [enum + mySQL + Variables]
#1

Thanks for checking my thread, I'm having an issue with this code:

Код:
                businessVariables[x][bProduct1]= systemItems[ProductID][iName];
                format(string, sizeof(string), "You have ordered %d %s 's on slot %d and set their price to $ %d", businessVariables[x][bProductAmount1], businessVariables[x][bProduct1], ProductSlot, businessVariables[x][bProductPrice1]);
                SendClientMessage(playerid, COLOR_GREY, string);
It will only change the first letter of the previous Product to the first letter of the new product.
Previous: Cigar
New: Beer
So what we get is: You have ordered 50 Bigar's on slot 1 and set their price to $ 5.

the code works fine like this:
Код:
                businessVariables[x][bProduct1]= systemItems[ProductID][iName];
                format(string, sizeof(string), "You have ordered %d %s 's on slot %d and set their price to $ %d", businessVariables[x][bProductAmount1], systemItems[ProductID][iName], ProductSlot, businessVariables[x][bProductPrice1]);
                SendClientMessage(playerid, COLOR_GREY, string);
I get: You have ordered 50 Beer's on slot 1 and set their price to $ 5.

But also in my mySQL database, businessProduct1 (bProduct1) shows as: Bigar
instead of Beer.

So I'm wondering what I'm doing wrong, hope someone can help me out!
Reply


Messages In This Thread
Only first letter, instead of the whole word HELP please [enum + mySQL + Variables] - by jesse237 - 19.10.2011, 18:57
Re: Only first letter, instead of the whole word HELP please [enum + mySQL + Variables] - by KoczkaHUN - 22.10.2011, 12:05

Forum Jump:


Users browsing this thread: 1 Guest(s)