View Single Post
  #14  
Old 06-04-2007, 10:06 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by xAndrewx View Post
Do you test anything you say?

PHP Code:
function onCreated()
{
  
temp.testA 0;
  
temp.myTest "|hia";
  
testA "lol";
  
  
this.onTest();
  
scheduleevent(3"Test""");
}
function 
onTest()
{
  echo(
temp.myTest);
  echo(
testA);

Constantly returns "lol".
I just tried that, I don't get anything echoed. You've obviously made a mistake before that current compilation.
Variable names are case sensitive so you probably messed up the name of temp.testA and the name didn't match the name of testA = "lol";

Static variables appear to be an exception to this case-sensitive thing though.
PHP Code:
function onCreated() {
  
temp.0;
  
"HELLO!";
  echo(
temp.r);

This script echos "HELLO!";

I've already extensively tested this and the only mistake I made was when I thought temp.variable; automatically initialized it to zero. Your input is not going to change anything.

Also another reason I want the custom object types, so I can have my own static and read-only variables.

Btw, I recommend the avoidance of any uppercase letters in variable names, object names not included of course.
__________________

Last edited by Inverness; 06-04-2007 at 10:22 PM..
Reply With Quote