Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Scheduleevent (https://forums.graalonline.com/forums/showthread.php?t=72896)

Chandler 03-17-2007 09:48 PM

Scheduleevent Error
 
HTML Code:

function onCreated()
  this.scheduleevent(5, "removeImages", {300, 301});
function onRemoveImages(imageIndexs)
  echo(temp.imageIndexs);

returns:
PHP Code:

300 

Doesn't transmit array types?

xXziroXx 03-17-2007 09:51 PM

Quote:

Originally Posted by Chandler (Post 1289648)
HTML Code:

function onCreated()
  this.scheduleevent(5, "removeImages", {300, 301});
function onRemoveImages(imageIndexs)
  echo(temp.imageIndexs);

returns:
PHP Code:

300 

Doesn't transmit array types?

Try:

PHP Code:

this.scheduleevent(5"removeImages", @{300301}); 


Chandler 03-17-2007 09:52 PM

No fix, returns same.

Riot 03-17-2007 09:54 PM

Quote:

Originally Posted by Chandler (Post 1289648)
HTML Code:

function onCreated()
  this.scheduleevent(5, "removeImages", {300, 301});
function onRemoveImages(imageIndexs)
  echo(temp.imageIndexs);

returns:
PHP Code:

300 

Doesn't transmit array types?

It passes them as separate params:
HTML Code:

function onCreated() {
  this.scheduleEvent(1, "Test", {"param0", "param1"});
}

function onTest() {
  echo(params[0]);
  echo(params[1]);
}

Returns:
param0
param1

You can get around this by doing an array in an array:
HTML Code:

function onCreated() {
  this.scheduleEvent(1, "Test", { {"param0", "param1"} });
}

function onTest() {
  echo(params[0]);
}

returns:
param0,param1

Chandler 03-17-2007 09:56 PM

Weird, it shouldn't do that!
Thanks for clearing it up, however, I'd like this fixed!

Riot 03-17-2007 10:05 PM

Quote:

Originally Posted by Chandler (Post 1289656)
Weird, it shouldn't do that!
Thanks for clearing it up, however, I'd like this fixed!

trigger(evt,params..) does the same thing, and I would imagine a few others do it as well.


All times are GMT +2. The time now is 06:24 AM.

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