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 05-11-2007, 06:47 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Chandler View Post
Why would you want to keep the VARIABLE data?
Here:
HTML Code:
function onCreated()
{
  temp.myList = {"hey", "hi", "lol"};
  for (currentItem: temp.myList)
    echo(currentItem);
  echo(currentItem);
  scheduleevent(3, "Repeat", "");
}
function onRepeat()
{
  echo(currentItem);
}
using temp. prefix's won't STORE the VARIABLE data.
You obviously don't know how those kind of loops work.

temp.str is set (temporary variable)
PHP Code:
for (temp.strthis.strlist) { ... } 
When not using a prefix in these kind of loops, a TEMP. variable is set.
PHP Code:
for (strthis.strlist) { ... } 
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #2  
Old 05-11-2007, 06:47 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by xXziroXx View Post
When not using a prefix in these kind of loops, a TEMP. variable is set.
PHP Code:
for (strthis.strlist) { ... } 
Balls, you speak lies.

You obviously don't know gscript two.

Try the script that I posted.
Reply With Quote
  #3  
Old 05-11-2007, 06:49 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Chandler View Post
Balls, you speak lies.
Yeah, sure.. Whatever you say. That's the way they work though, perhaps you should try if your script works before you post it.



PHP Code:
function onCreated()
{
  
temp.myList = {"hey""hi""lol"};
  for (
currentItemtemp.myList)
    echo(
currentItem);
  echo(
currentItem);
  
scheduleevent(3"Repeat""");
}
function 
onRepeat()
{
  echo(
currentItem);

When onRepeat() is called, it will echo absolutely nothing!
__________________
Follow my work on social media post-Graal:Updated august 2025.
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 02:17 PM.


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