Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   GScript2: Possible bug/optimization problem (https://forums.graalonline.com/forums/showthread.php?t=59003)

Rick 05-18-2005 12:59 AM

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.

Velox Cruentus 05-18-2005 01:02 AM

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.


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

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