Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why are some of my empty lines in my script acting as if they are not a line?

I was programming a game that I am working on and an error came up. The usual go back and fix it type error. When I get to my script, the line is empty. I try adding a debug to that line (Red dot on the line of code) and it shifts down one line to the line which seems to have code concerning my error. This has led me to believe that my blank line is being regarded as non existent. When I type code in that line, it goes back to being a normal line until I remove the code. Why is this??

6 comments

0

Granted, this issue is not a big one, it is still interesting and annoying at the same time.

0

I’ve never encountered a problem like this. Very strange.

0

This might sound a bit stupid but try reading the error well, maybe it's a character that for some reason ignored by Roblox Script Editor yet it's still there and maybe try pasting everything into a new script -in a new place maybe-.

0

Well, the error was involving datastorage 2 so I would say the error does not matter, but the line it outputted was wrong. I tried copying it into a new script and the debug issue was still there. I did not get a chance to test the error though.

0

The only time I've ever experienced this is deleting or adding something after the error was caught. If you add a new line (for whatever reason) then click the link to show where the error is, the compiler uses the old line number and will point to a seemingly blank line of code. Not saying this is what's happening, but it's the only time I've witnessed this.

0

Yes, this seems to make sense. I could not tell you exactly if this is what happened because it has been a few days, but I don't think this is what happened.

1 answer

certain errors from lines ahead break stuff a line before sometimes which I don't know why but I have noticed some issues like changing a value Ex block.Int = 0; if you just specify the name and not the .Value after it, I get a weird error, usually the line before, and in the output stating "Int is not a valid member of block." which confused me at a point because it is. The errors need to be fixed as seen but always check around until this problem is solved. Also for that kind of output it should say something more like "You cannot change the state of a instance (IntValue)".

Remember, this answer is just to help clear up confusion with the roblox studio version of Lua. Yes, Lua in studio is different from real lua.

This discussion is preserved as it was. New answers, comments, and votes are closed.