Bean666 Posted February 23, 2021 Posted February 23, 2021 (edited) why is my health stat not saving, this is the only thing that's not saving on my savesystem, health, datas, etc work, but this don't. onLogin - local purifierHealth = getAccountData( theCurrentAccount, "purifierhealth") setTimer (setPedStat, 500, 1, source, purifierHealth) onQuit - setAccountData(account, "purifierhealth", getPedStat(source, 24)) I even tried putting tonumber on the getPedStat(source, 24) but it still didnt work Edited February 23, 2021 by Bean666 Aftermath
Moderators IIYAMA Posted February 23, 2021 Moderators Posted February 23, 2021 7 hours ago, Bean666 said: I even tried putting tonumber on the getPedStat(source, 24) but it still didnt work The setPedStat was not working, the stat id was not filled in. iprint("purifierHealth", purifierHealth) setTimer (setPedStat, 500, 1, source, 24, purifierHealth) 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Bean666 Posted February 23, 2021 Author Posted February 23, 2021 18 minutes ago, IIYAMA said: The setPedStat was not working, the stat id was not filled in. iprint("purifierHealth", purifierHealth) setTimer (setPedStat, 500, 1, source, 24, purifierHealth) thankyou. 1 Aftermath
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now