View Single Post
  #3  
Old 04-14-2007, 04:30 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Skyld View Post
Interesting, although I feel randomstring(array); might be a bit more useful here (should avoid index stuff):

Something like:

PHP Code:
function calculate()
{
  
this.random randomstring(this.alphabet);

  if (
this.random != this.random_last)
  {
    
this.random_last temp.letter;

    
container_game_text.text format("Press '%s'"this.random);
    
container_game_text.135;
  }
    else
  {
    
this.calculate();
  }

Ah, I didn't know about this command. Either way, is there really a major difference?

Quote:
Originally Posted by Skyld View Post
Also, while it's probably nice that you've tried to demonstrate this, it's a bit misleading and probably not that efficient either, since you are running a check twice:
PHP Code:
if (this.container_on "On" "Off" == "On"
Perhaps changing it to standard true/false values and using:
PHP Code:
if (this.container_on

Yeah, I know. I was just wondering the different ways of using those conditional statements and found that you can do conditional if statements with them.

PHP Code:
if (this.container_on)
{
 
//

or

PHP Code:
if (this.container_on == true)
{
 
//


Both would have been better alternatives, I know.
Reply With Quote