javascript eval funciton
i what to ahieve some funcion like javascript eval.
such as: PHP Code:
|
Re: javascript eval funciton
No.
|
Re: javascript eval funciton
Use this:
PHP Code:
|
Re: javascript eval funciton
And here I thought ServerCommand() was bad enough already... lol.
|
Re: javascript eval funciton
Quote:
|
Re: javascript eval funciton
Sourcemod can't do this anyway (I think) because the code in the string would need to be compiled to bytecode before it can be ran in the VM. The VM can't just execute any arbitrary source code - it needs the bytecode compiled version. Only spcomp does the source --> bytecode translation.
Then again I could be talking out of my ass so I dunno. If it can be remade to do that then I'd wonder why smx files + GPLv3 exist together. |
Re: javascript eval funciton
actually i what sourcemod achieve some special function.
For Example: new String:Skill[2][32] = { "SKILL_1[Client]", "SKILL_2[Client]" }; for(new i = 0; i < 2; i++) { eval(Skill[i])++; //here i want SKILL_1[Client]++ } |
Re: javascript eval funciton
neither of those are very good examples o.o
|
Re: javascript eval funciton
Let me get this straight, you want to do math operations on a variable but you only got a string to work with?
|
Re: javascript eval funciton
Quote:
|
All times are GMT -4. The time now is 11:58. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.