Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
dantesino2

Please help with MySql saving KDS

Question

Hello guise!

 

I have a problem! I have script called "bl_SaveInfo" in C#. In this script i have my K/D/S data (Kills/Deaths/Score). Its defined like "t_kills", "t_deaths" and "t_score".

 

Then i have script "bl_RoomMenu" in which i want to make function to save my KDS after game ends.

 

So i have this:


Please login or register to see this code.


Please login or register to see this code.

 

Then (!) in my "OnLeftRoom" i have this line:

 


Please login or register to see this code.

 

It works great, but it saves only these numbers i literally write into script. But i want it to save current data which i have like this :

 


Please login or register to see this code.

 

^these are in game stats of player (if he kills someone, if he dies atc..)

 

and when i want to reference to these stats like this

 


Please login or register to see this code.

 

but it wont let me leave room so it doesnt save data. It just count down (as it would if round ended) but it stopped at 0 and do nothing.

 

What am i doing wrong? I also tried to reference on these "t_kills" (as its writen on top of this post) i do it like this :

 


Please login or register to see this code.

 

it shows me this error "Argument `#1' cannot convert `bl_SaveInfo' expression to type `int'".

 

Can someone please help me? If you need more informations, or whole script or something, just tell me. I have no idea how to fix it or what is wrong with this. Also i want to apologise about my english, im not native speaker. Thank you for all help, guys!

Edited by dantesino2

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

In here

SaveInfo.SaveInfo (10, 10, 10);

You save int value and works... means your function takes only ints.

So

PropiertiesKeys.ScoreKey is enum right?

player.customProperties[PropiertiesKeys.ScoreKey]

does this return int?

what it gives when you print it to console?

Edited by nub

Share this post


Link to post
Share on other sites

  • 0

If you buy this assets from the creator (MFPS and ULogin System),  it is best that you ask it directly, you can do it on their forum:

Please login or register to see this link.

Edited by Prototic

Share this post


Link to post
Share on other sites
  • 0

I just had to initialize PhotonNetwork function. At the end i did it like this:

 

Please login or register to see this code.
 
Its (as Prototic said) MFPS kit,so if someone have this one and dont know how to do it, here it is. Then you just need to call Please login or register to see this code.  whenever you want it to save. Also you need to call "Please login or register to see this code. ".

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...