Cyrix Posted March 5, 2013 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 150 Reputation: 13 Joined: 02/16/12 Last Seen: April 10, 2023 Share Posted March 5, 2013 i need help to find the correct funcion to save shop name in db. sd->vending.amount = amount; // item amount sd->status.cart[index].nameid // item name sd->vending.value / item value and to shop name? sd->vending.title = title; ????????? sd->vending.shop_title = shop_title; ????????? thanks I'm using sd->message Shop Name = asdasdasasd db save this -> 284825544 Quote Link to comment Share on other sites More sharing options...
clydelion Posted March 6, 2013 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 754 Reputation: 186 Joined: 05/22/12 Last Seen: October 15, 2022 Share Posted March 6, 2013 %d is for numerical values. Use %s. 2 Quote Link to comment Share on other sites More sharing options...
Lighta Posted March 6, 2013 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 737 Reputation: 216 Joined: 11/29/11 Last Seen: December 20, 2020 Share Posted March 6, 2013 that wouldn't make sense to put it in the struct, that struct represent each item that are being sold in the shop. itemid, price, amount. you don't have a shop title for each item being sold, well you could but that useless. I don't get what u mean when u said save in db, atm you trying to setting it to a struct, well in abuse of langage we could said it's our itemtovend db, we not really saving it. It's only assign to ram. I need more info to help you correctly here. if you do want to save it really to your db, and I mean mysql db, you'll send to prepare a packet and an handle in char.c to save it, you can take exemple with inventory or auction. The name of shop are stored on sd->message yes. Quote Link to comment Share on other sites More sharing options...
Cyrix Posted March 6, 2013 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 150 Reputation: 13 Joined: 02/16/12 Last Seen: April 10, 2023 Author Share Posted March 6, 2013 (edited) in game ------> Shop Name = My Shop Name mysql db -----> Shop Name = 285654856 (sd->message) Correct: (but dont work - sd->message) Edited March 6, 2013 by Cyrix Quote Link to comment Share on other sites More sharing options...
Cyrix Posted March 6, 2013 Group: Members Topic Count: 44 Topics Per Day: 0.01 Content Count: 150 Reputation: 13 Joined: 02/16/12 Last Seen: April 10, 2023 Author Share Posted March 6, 2013 %d is for numerical values. Use %s. Thanks .... Solved. Quote Link to comment Share on other sites More sharing options...
Question
Cyrix
i need help to find the correct funcion to save shop name in db.
I'm using
sd->message
Shop Name = asdasdasasd
db save this -> 284825544
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.