Jump to content
  • 0

SD-> Vending - Shop name


Cyrix

Question


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   13
  • Joined:  02/16/12
  • Last Seen:  

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

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

%d is for numerical values. Use %s.

  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   13
  • Joined:  02/16/12
  • Last Seen:  

in game ------> Shop Name = My Shop Name

 

 

mysql db -----> Shop Name = 285654856  (sd->message)

 

lnnuDw4.png

 

Correct: (but dont work -  sd->message)

 

vfXJMDp.png

 


Edited by Cyrix
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   13
  • Joined:  02/16/12
  • Last Seen:  

%d is for numerical values. Use %s.

Thanks ....

 

Solved.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...