![]() |
Functions & Parameters
Functions should be able to handle extra parameters that are undeclared, much like trigger events:
PHP Code:
PHP Code:
Reenable this.destroy() == Deleting the weapon (client & serverside) and let protectedweapon prevent it from deleting serverside? Umm... Removing weapons with GUI Control doesn't delete the GUI Control. |
Quote:
|
Since GS2?
function addWeapons(parameter,parameter)? |
Quote:
Why don't you just accept an array as one of the parameters? |
Yes you can pass parameters as array, like myfunction(p1,p2,{p3,p4,p5}), then
function myfunction(p1,p2,openparams) { echo(p1 @ "," @ p2 @ "," @ openparams[0] @ "," @ openparams[1]); // etc. } |
Thanks -- Although, it's a weird way to do such thing.
This should go in Tech: fuction x(){ return {list};} sendtonc(x()); == CRASH! This should go here, however ('creates new thread') return should be able to return string lists? This too: Instead of saving the strings with """Text""" in a string list, you could do: {"Test","Other"} Where everything in the " to the last " aren't shown, and the "'s in text can be worked out with the escape character, such as: \" Thus: {"John: And then, bobby said \"Maipas!\","Billy: No?! REALLY!?"} INSTEAD OF: "John: And then, bobby said ""Maipas!""","Billy: No Really?!" If would make the strings a lot more readable, especially in multidimensional arrays: "Ditto,""prop,prop"",Ditto,""prop,prop""","Ditto," "prop,prop"""",prop""""""","Ditto,""prop,""" Instead of: {{"Ditto",{"prop","prop"},"Ditto",{"prop","prop"}} ,{"Ditto",{"prop","prop"}}} The second form is a lot easier to read then the first one, and we can establish a more direct meaning between the tring being a string, string list, or variable. |
Quote:
|
... Yea?
|
Uhhh, you can already use escape sequences for strings.
|
I was referring to the string lists... In /open Velox Cruentus list.... O,o;
|
I agree with Velox, having string arrays saved as:
string=1,2,"3,32,33",4 istead of something like: string={1,2,{3,32,33},4} is annoying. |
| All times are GMT +2. The time now is 09:39 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.