![]() |
'var', what's up with 'var'?
lets see..
PHP Code:
Using var can't be used anywhere any longer? And is now being used as: PHP Code:
What's with the sudden use of var? I now have to rescript all scripts on Symphonia just because the use the word VAR... PHP Code:
So, yet again I have to ask, whats with the sudden use of var? |
I haven't noticed this o.o
|
Quote:
|
Quote:
PHP Code:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
If you're saying it works fine then restart your NPC-Server and try again. It takes a restart for the NPC-Server to update to the latest version.
|
Works on Era, too.
|
Still doesn't work on Symp, too. :p
|
Maybe it's only supported on older npc servers?
|
I restarted the npcserver and the var thing isn't working now, so it must be something up with the new update.
Is there a changelog somewhere? The update messed up the mud on AEON, and I have a feeling it's because of a variable that is now read only for some reason. |
Uh-oh. Doesnt sound good. Somebody clear this up *looks around for Stefan*
|
You can't just take variables that are being used and disable them x.x
What the hell is wrong with Stefan? |
We have uploaded new versions of gserver and npcserver to the playerworld machines for fixing the problem with a playerworld that was lagging a lot. There are a few modifications to the scripting: it is much faster now and we've improved the compatibility to javascript/actionscript. There are several new keywords which are basicly ignored ("static" and "var"). It was not meant to be used for other servers though, it could be possible to add a check for still allowing them as normal variables.
|
Quote:
|
Quote:
Stefan I would love if you'd give us a bit of warning ahead of time before you do something like that :/ |
Quote:
|
Yeah, the var seems to be a new update, but I don't seem to understand why it's needed, like why do we need a new type? >:[
Well, I finished rescripting everything so it didn't use 'var' some hours ago.. Took me 1 hour to look for a bug I thought was there (wasn't loading vars into a object, seemed that I was using "SCRIPT 2" and I had to edit it to work.. =/) SCRIPT 2 PHP Code:
Still, it's kinda annoying that there's no changelog, no notice about it, but a random update no one knew about.. (Happened about 22-23 hours ago) And about more support for javascript, why did you add var type from javascript? :o |
Didn't know that many people are restarting their npcservers all the time. You can still use "temp.var" but not "var" alone. I will check if we can add a fix or make it optional. The new npcserver version is only on the machines for private or hosted servers, not for gold or classic.
If your server has problems then look into logs/syntaxerrors.txt |
Quote:
|
This is for JavaScript/ActionScript compatibility. `var` in either of these is akin to temp. and static is a `function` qualifier. We don't need it, unless we want to use ActionScript 3. Seems good enough for me. :confused:
Quote:
PHP Code:
|
There is also support for dots in class names and "import" and an extension to the new constructor, but like i said its more experimental. It's basicly for easier cut & paste of existing scripts. The keywords "var" and "static" are currently ignored, so when you start a code line with those words it is ignoring them and of course seeing an error in the following script. It's possible to switch the npcserver back to the old version until that problem is fixed, if it's really a big problem.
|
Jesus guys, why don't you just name your damn variables as v instead of var? I rarely use temp variables that are more then 2 letters in length.
Also, just script scan, F3 and ctrl+v a bunch of times and your var problem is fixed (be sure to enable fullword only). I've replaced variable names on my whole server many times and it only took me about 5 minutes tops to replace about 70 instances or so. |
Quote:
|
Quote:
|
Quote:
|
Ok the npcserver has been updated, you can now use "var" as function parameter and variable name again. The built-in values "NULL", "true", "false" and "pi" also work as function parameter names again instead of displaying an error.
|
| All times are GMT +2. The time now is 01:56 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.