Author Topic: Savefile = Decimal  (Read 1386 times)

0 Members and 1 Guest are viewing this topic.

Doktor_Media

  • Youngling
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
  • Twitch Name: Doktor_Media
Savefile = Decimal
« on: March 06, 2017, 01:49:20 AM »
Hello,

when i try to save numbers via @savefile, deepbot sets a decimal in it :/

What i want: 25001
What i get: 25,001

What can i do to stop this? It seems that Deepbot can't read this format :/



greetings

Code: (from Invest Command)
@editpoints@[@user@|-@target@] @if@[@readfile@[Bildung\@user@.txt]||||@savefile@[Bildung\@user@.txt,@target@]||@savefile@[Bildung\@user@.txt,@calc@[+|@target@|@readfile@[Bildung\@user@.txt]]]] @exec@[1,!lernenfinal @target@]
« Last Edit: March 06, 2017, 02:22:11 AM by Doktor_Media »

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Savefile = Decimal
« Reply #1 on: March 06, 2017, 03:30:21 AM »
Well if it is saving the user's points, then use: @intpoints@ Pulls points without the thousands separator.
Old Name: RepentGamingTV
Twitch: Here

Need help ASAP?
Join Deepbot's Discord: Discord.Deepbot.tv
Deepbot's Twitter: @DeepSupport

Doktor_Media

  • Youngling
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
  • Twitch Name: Doktor_Media
Re: Savefile = Decimal
« Reply #2 on: March 06, 2017, 04:18:26 AM »
I am using @editpoints@ from the Invest Command:

@editpoints@[@user@|-@target@] @if@[@readfile@[Bildung\@user@.txt]||||@savefile@[Bildung\@user@.txt,@target@]||@savefile@[Bildung\@user@.txt,@calc@[+|@target@|@readfile@[Bildung\@user@.txt]]]] @exec@[1,!lernenfinal @target@]


How can i combine adding and removing points with intponts?

Doktor_Media

  • Youngling
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
  • Twitch Name: Doktor_Media
Re: Savefile = Decimal
« Reply #3 on: March 07, 2017, 06:17:16 PM »
I've wrote a new code, but i don't know how to integrate @intpoints@ - i didnt get it ;(

Users can save points in a txt-file with their usernames, so i need to know how i can use @intpoints@ with txt files.
Its necessary because its like a second important currency (you can change your @points@ in the second currency).

The code is:
@editpoints@[@user@|-@target@] -
For editing (removing) the real currency (@points@)

But now the problem line:

@savefile@[Bildung\@user@.txt,@calc@[+|@target@|@readfile@[Bildung\@user@.txt]]]
Calculates the second currency and save it in a txt-file. Every value above 1000 gets a decimal in it.

I need to remove this decimal, because DeepBot cant read this format, when i try to read it out for new commands.

regards
« Last Edit: March 07, 2017, 06:23:39 PM by Doktor_Media »

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Savefile = Decimal
« Reply #4 on: March 08, 2017, 11:42:21 AM »
@intpoints@ is exactly like @points@, but puts the users points in number format with out commas, not sure about decimals tho.
Old Name: RepentGamingTV
Twitch: Here

Need help ASAP?
Join Deepbot's Discord: Discord.Deepbot.tv
Deepbot's Twitter: @DeepSupport