[XP] Complete Climate and Time System (CCTS)

Started by ForeverZer0, May 12, 2010, 06:08:20 pm

Previous topic - Next topic

rlm1000

I get a syntax error on line 877, not sure why though. Your script update looks nice and streamlined though.

ForeverZer0

Oops!
I fixed it. I forgot a something small I threw it in just before uploading the script, and never tested it for just such a thing. Thanks for pointing out, much appreciated.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Sacred Nym

I got an error "Uninitialized constant MINUTE_VARIABLE" error when trying to restore a memorized time. Line 833
Quote昨日の自分に「さようなら」
Say "Goodbye" to who you were yesterday.

rlm1000

October 13, 2010, 02:35:18 pm #63 Last Edit: October 13, 2010, 02:52:08 pm by rlm1000
Quote from: ForeverZer0 on October 13, 2010, 12:06:57 pm
Oops!
I fixed it. I forgot a something small I threw it in just before uploading the script, and never tested it for just such a thing. Thanks for pointing out, much appreciated.


No problem, glad I could help :)

EDIT: Just so you know, it appears you are using the same default switch number for the good weather switch and the day switch.

Mimi Chan

For the MINUTE_VARIABLE error, just add CCTS:: before it.
$game_variables[CCTS::MINUTE_VARIABLE] = @minute if CCTS::MINUTE_VARIABLE != nil

Same goes for the rest.

Though Zero, I don't think variables are properly set up. I tried doing a conditional branch using the time variables but it's not working o.oa
What's a sig?

ForeverZer0

I'll fix these bugs tonight.
I added them last second, and obviously didn't test them.
Sorry everyone, they shall all be fixed soon.  :shy:
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Mimi Chan

It's okay *.*
At least I know it's a problem with the script. Because I was burning my head for hours wondering why variable doesn't work >.<

Also what is the script syntax to check for time o.oa
Like for a bakery, if time is 10pm - 7am then return Shop close
And its open only on Mon-Friday

o.oa
What's a sig?

ForeverZer0

Quote from: Mimi Chan on October 14, 2010, 05:19:06 pm
It's okay *.*
At least I know it's a problem with the script. Because I was burning my head for hours wondering why variable doesn't work >.<

Also what is the script syntax to check for time o.oa
Like for a bakery, if time is 10pm - 7am then return Shop close
And its open only on Mon-Friday

o.oa


$game_system.time.hour.between?(10, 19)


That will return a true/false if the hour is between the two numbers.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Blizzard

Careful, between? is inclusive. It should be (10, 18) if it closes at 7pm. Though, the times is 7am to 10pm so it should be (7, 21).
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Mimi Chan

So by inclusive you mean uhh...only the numbers between two numbers are counted? (4, 10) will only count 5 to 9 o.oa

So I am guessing I will just change the hour into the other variables *.*
$game_system.time.day.between? (1-5) for mon-friday o.oa

I will make a very life like town *.*

Though the variables need fixing since it's not working at the moment ^^;
What's a sig?

Blizzard

Quote from: Mimi Chan on October 15, 2010, 01:31:14 pm
So by inclusive you mean uhh...only the numbers between two numbers are counted? (4, 10) will only count 5 to 9 o.oa


That's exclusive. Inclusive would mean that the numbers 4 and 10 are included in the range (as the words suggest, inclusive-including, etc.).
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Mimi Chan

Ah okie thanks *.*
$game_system.time.hour.between? I guess I can use this to bypass relying on variables *.*
What's a sig?

The Niche

Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

Blizzard

In the example of (4, 10), exclusive would mean from 5 to 9.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

The Niche

Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

Blizzard

There is no syntax for exclusive. If you really want exclusive from 4 to 10, just use "between?(5, 9)".
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

The Niche

Ah, ok. *Tries to see any possible benefits of having an exclusive method*
*fails*

You have taughtme, Blizzard-sensei.
Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

Mimi Chan

While $game_system.time.hour.between? is for ranges, how to check for exact hour o.oa
Like if it's 6am then...etc.
What's a sig?

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

[Luke]

October 16, 2010, 06:24:38 pm #79 Last Edit: October 16, 2010, 06:28:29 pm by [Luke]
Niche, if you really need an exclusive method, like... ummm... when you really need non-integer values (floats, doubles - just real numbers) you can simply use this:
($floating_point_variable > minimum && $floating_point_variable < maximum)
while "between?(number_that_your_variable_should_be_greater_than, number_that_your_variable_should_be_lesser_than)" method is just an equivalent for
($some_numeric_value >= n_t_y_v_s_b_g_t && $some_numeric_value <= n_t_y_v_s_b_l_t)
In general, between? just spares some copypastes and keyboard hits. Which is purely awesome, because that's what are all the high-level programming languages about.

I'll let you know as soon as I write the Global Time and Weather CCTS Plugin for RMX-OS. I had quit working on it since another part of tests after the release of the first version turned it out to be an ultimate disaster - I have to understand much more about CCTS.