![]() |
function arguments
can you pass arguments through functions in graal like this?
funtion Test(this.test){ this.test+=5; } Test(5); this.test would now be worth 10 if it worked |
Re: function arguments
Quote:
|
Re: Re: function arguments
Quote:
|
Re: Re: Re: function arguments
Quote:
|
at the moment there is no way to use parameters with functions
the () are just used to say, that a function is called... but functions in gscript accept every variable that was set in the NPC so u can just use this.test if u set it somewhere else in the whole code like if(playerenters){ this.test=5; showtext(); } function showtext() { message The Number is #v(this.test); } |
Stefan had said he wasnt gonna do it cuz it had to change a lot of stuff or something
|
well...
see you can't do that..
but it doesn't matter... cause since gscript has a global scope there is no point... i have always thought there should be global function like NPC Code: like have a server npc for doing l33t server stuff... -Past... |
Re: well...
Quote:
|
*wants Stefan to add support for arguments in functions*
*has wanted him to since functions were added* |
OK, I made this `script` a LONG time ago. It shows how to add stuff for string and stuff.
NPC Code: |
| All times are GMT +2. The time now is 03:08 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.