write a reply that I say: “Thanks for the update. Glad to hear that resetting the levels…
- User
write a reply that I say: “Thanks for the update. Glad to hear that resetting the levels and XP helped stop the issue for now.
Since the totalXp stays at 0 but the individual XP variable is changing, it does sound like there might be something going on either with how totalXp is being updated or saved, unless the app developers are changing some functions or bugging them. 😅
A couple of things you could try/check:
- Confirm that totalXp is being properly incremented and saved after each message or XP gain, sometimes a small typo or logic issue can cause it to never update even if individual XP changes.
- Make sure you aren’t resetting totalXp accidentally anywhere else in your code besides the intended reset. 😉
- Correct, the function $resetUserVar is used just for the variable xp to be cleared after reaching another level so users can start back to 0 xp for the new higher xp requirement.
If you want, feel free to share a snippet of your XP update logic here and I can take a closer look to help pinpoint what might be going on.
Glad to assist and happy to help get this running smoothly again. Let me know how it 🙂 goes. 🙂”
- Assistant
Thanks for the detailed pointers! I’ll double-check the increment and save logic for totalXp to make sure it’s updating properly after each gain. Also, I’ll review the code to ensure totalXp isn’t being reset unintentionally anywhere else.
I appreciate the clarification on how $resetUserVar works for the xp variable—that helps clear up some confusion. If things still don’t look right after these checks, I’ll share a snippet of the XP update logic here so you can take a closer look.
Thanks again for your help and support—I’ll keep you posted on how it goes! 🙂