Jump to content
  • 0

Broken script, help


GameCrasher
 Share

Question

9 answers to this question

Recommended Posts

  • 0
8 hours ago, ItsSC said:

A little question, what your inf gonna do ? Why edit the same value over and over?

Its for a game with a timer, the timer has 60 seconds then the llayer recieves 10$ and editing the value to 59-60 changes the time to 1 so it hits 0, when it hits zero the timer restarts so if i edit it over and over the player will recieve a bunch of money.

Link to comment
Share on other sites

  • 0
2 hours ago, GameCrasher said:

Its for a game with a timer, the timer has 60 seconds then the llayer recieves 10$ and editing the value to 59-60 changes the time to 1 so it hits 0, when it hits zero the timer restarts so if i edit it over and over the player will recieve a bunch of money.

Maybe the calculation is wrong..

For example, as your script asked "Timer number"

if timer = 5, it should be 5, am I right? Then in your script you do 60-5, it become 55. So it is something wrong.

 

Just from my plain guess.

you should do this

timer = gg.prompt( {"TIMER NUMBER"},{""},{"number"})
if(timer[1]>=60)then
  time = 60-timer[1]
  else
  time = timer[1]
end

This means when the time is 60 seconds, it should return 0. If time is 55, it should return 55, but your current script will return 5.

Link to comment
Share on other sites

  • 0
4 hours ago, ItsSC said:

Maybe the calculation is wrong..

For example, as your script asked "Timer number"

if timer = 5, it should be 5, am I right? Then in your script you do 60-5, it become 55. So it is something wrong.

 

Just from my plain guess.

you should do this


timer = gg.prompt( {"TIMER NUMBER"},{""},{"number"})
if(timer[1]>=60)then
  time = 60-timer[1]
  else
  time = timer[1]
end

This means when the time is 60 seconds, it should return 0. If time is 55, it should return 55, but your current script will return 5.

Whem I edit the value to any number, it subtracts the value from the timer, Also I appreciate the help bro.

Edited by GameCrasher
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.