I’ve now experienced for the last 2-3 days, that intellisense in the script editor on ROBLOX has behaved way too… weird.
Here’s my observations:
[ul]
[li]It takes roughly 0.5 seconds for intellisense to break in, showing/hiding red/blue lines. It happened instantly before.[/li]
[li]A blue line keeps bugging me, I’ll show that below.[/li]
[/ul]
So… as for #2 on the observation-list, here’s an example (note I cleared out code below line 46, which is why there’s an expand-arrow)
As you can see, the function “waitForProperty” is clearly defined. Problem is, the blue line won’t cease to exist. There’s nowhere I see anything making sense for that blue line to appear. ?
[quote]Putting the keyword ‘local’ in front of the function declaration will solve that[/quote]However, if you call the function above its declaration (for instance, if you have two functions that need to call each other), intellisense will go back and forth between asking you to make it local and telling you it’s an unknown global. This update is annoying, I don’t want to have to forward declare all of my functions just because it suggests they should be local. We should be able to silence this warning.
It’s also annoying that the blue underline appears at the call of the function instead of at the function definition, so if I do want to take the time to silence them, I have to search for the function before adding ‘local’.
Well… I tried having a local variable, after that happened. Trying to refer to it afterwards still resulted in a blue line. Something before the case I presented in OP seems to have triggered this bug, but I’m not sure what it could be though.
It’s not intellisense, its our Syntax checker. It’s basically saying that its being used only once, so why don’t you make it a local function. I think if you use it one more time in a different scope it will no longer underline it as a warning. Blue underline is warnings and doesn’t mean that anything is necessarily wrong, it just means things could be better!
Regarding the original thread; can you post the full script source? Here’s some code that will cause this warning:
function foo()
function bar()
end
bar()
end
The analyzer is telling you that despite the fact you declared bar() inside foo(), it’s a global function and you should use local keyword to state your intent clearly.
Also, this work seems to have led me to another problem, in which I discussed with einsteinK on the #ROBLOX IRC channel. Seems like :CreatePlaceInPlayerInventory got some… downsides, which utterly makes it too dangerous to work with. Guess that’ll come in another thread.
Open Roblox’s Animation Editor plugin script; you’ll get 50 warnings, many of which are examples of this-- just about any function that is declared in the normal script scope (not within another function), without being local, and called later produce it.
makes this (note, the 2nd image is from a client of mine, which reported the problem to me)…
Notice; [strike]it only errors in instances such as Scripts, LocalScripts and ModuleScripts. Not the Command Bar. I’m not sure whether it works with plugins or not, but the bug/error is related to hexadecimal numbers[/strike] it’s a syntax error, and the code will run as expected, though the red underline and generated message in Script Analysis (I guess the 2nd image is script analysis) gives problems here. Good it’s not stopping the code completely.
I had to hurry, sorry for the vaguage information!!!