Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-08-2008, 01:24 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
I thought the problem was that it was rejecting any string named message, therefor, it wouldn't let you do x.message ... ?
__________________
Reply With Quote
  #2  
Old 04-08-2008, 02:59 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by cbkbud View Post
I thought the problem was that it was rejecting any string named message, therefor, it wouldn't let you do x.message ... ?
Actually it only only happens when using findnpc, findplayer, findlevel, actually, any function like object, odd huh?

All these scripts will produce the line
PHP Code:
function onCreated() {
  echo(
findplayer("Chompy").message); // if the player exists or not doesn't matter
}
/*
Script compiler output for ChompyTest:
Weapon/GUI-script ChompyTest added/updated by Chompy
*/ 
PHP Code:
function onCreated() {
  echo(
findad("pepsi").message); // doesn't matter if the function exists
}
/*
Script compiler output for ChompyTest:
Weapon/GUI-script ChompyTest added/updated by Chompy
*/ 
PHP Code:
function onCreated() {
    echo(
findbirdandpatit().message); // you get the point..
}
/*
Script compiler output for ChompyTest:
Weapon/GUI-script ChompyTest added/updated by Chompy
*/ 
Now, the weird thing about it is..

this works:

PHP Code:
function onCreated() {
  
temp.a_b = new TStaticVar();
  
temp.a_b."foo";
  
  
temp."_b";
  
  echo(
makevar("a"@b).c);
}
/*
foo
*/ 
while this doesn't
PHP Code:
function onCreated() {
  
temp.a_b = new TStaticVar();
  
temp.a_b.message "foo";
  
  
temp."_b";
  
  echo(
makevar("a"@b).message);
}
/*
Script compiler output for ChompyTest:
Weapon/GUI-script ChompyTest added/updated by Chompy
*/ 
__________________
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 07:15 AM.


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