Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Announcements
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-18-2007, 08:28 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
NPCServer updates

Today the npcservers have been updated. Here some of the updates:

- /style works again
- improved /scripthelp which also lists object types that match
- fixed int(random(lowerlimit, upperlimit)) which sometimes reached upperlimit (when the random number was too close to the upperlimit it was rounding to upperlimit)
- scripts can now access image files (png, gif, jpeg) and also files inside the levels folder if the npcserver has the rights for that
- if you call a function of another object which is non-public, then it will display that the function is not accessible, instead of saying that the function doesn't exist
- graal script now supports function objects: this will print "param: 123"

PHP Code:
function onCreated() {
  
this.func this.func1;
  
this.func(123);
}
function 
func1(param) {
  echo(
"param: " param);

You can also do this, but keep care to add a semicolon behind the function declaration:

PHP Code:
this.func = function() {
  echo(
"nameless function");
}; 
This is only working on serverside, it will work on clientside with the next Graal version.
There is a protection against unsetting functions, since often scripts use the same name for functions and variables. If the variable is not linking to a function but the script contains a function with that name, then it will use the function defined in the script instead. You can however link to another function.
Reply With Quote
 


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 05:13 PM.


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