Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-18-2005, 12:59 AM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
Lightbulb GScript2: Possible bug/optimization problem

HTML Code:
if (function() == true)
{
}
It will not execute the condition at all, if there is no code within the braces. Now, this could be desired behavior, but what if function() is supposed to do something that modifies the enviornment?

The easiest way to observe this problem:

HTML Code:
function sendrcamessage()
{
  sendtorc("if ...");
  return true;
}

function onCreated()
{
  if (sendrcamessage() == true)
  {
  }
}
I came across this problem when quickly prototyping some new code.
Reply With Quote
  #2  
Old 05-18-2005, 01:02 AM
Velox Cruentus Velox Cruentus is offline
Registered User
Velox Cruentus's Avatar
Join Date: Dec 2004
Location: Quebec, Canada
Posts: 465
Velox Cruentus is on a distinguished road
Send a message via ICQ to Velox Cruentus Send a message via AIM to Velox Cruentus
Unclear... But I do suppose I know what you mean... I have:

PHP Code:
function onactionserverside(user,pass)
{
  if (
loginbank(user,pass))
  {
     
// Wee!
  
} else {
    
// No Match.
  
}

... It does work however. Unless you mean that if the function is inexistant? I'm not to sure what you're aiming for.

EDIT: Reread it... The condition DOES execute my login scripts, Rick.
RE-EDIT: Err... I don't see why that would be practical. Ohwell.
__________________
In a world of change... Who'll you believe?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:35 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.