Jump to content




[Lua][Error]bios:337: [string "DynationOS"]:23: unexpected symbol


  • You cannot reply to this topic
13 replies to this topic

#1 Spongy141

  • Members
  • 526 posts
  • Location'Merica

Posted 16 March 2013 - 02:54 PM

Hello, as the title says, I got an error, (not going to re-type it), and it says something is wrong with line 14... I can't seem to figure it out, so can one of you "Pros" help me out?
link to my code http://pastebin.com/whd2cMHu

EDIT: My bad, I added the copy right after I started the topic, so its really at line 23 now... sorry

#2 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 16 March 2013 - 03:14 PM

Actually, the title error you gave says line 23, the string "DynationOS" thing is the program name

around line 23 you have this:
local tCoords = {
    [1] = { 36, 50, 15, 16, "Create Account" },
	    [2] = { 2, 7, 15, 16, "Login" }, --this is line 23
  }

Your issue is the second comma, it implies that you're going to add another item to the table but you don't, you leave it blank, hence the error.

#3 Spongy141

  • Members
  • 526 posts
  • Location'Merica

Posted 16 March 2013 - 03:18 PM

View PostPharap, on 16 March 2013 - 03:14 PM, said:

Actually, the title error you gave says line 23, the string "DynationOS" thing is the program name

around line 23 you have this:
local tCoords = {
	[1] = { 36, 50, 15, 16, "Create Account" },
		[2] = { 2, 7, 15, 16, "Login" }, --this is line 23
  }

Your issue is the second comma, it implies that you're going to add another item to the table but you don't, you leave it blank, hence the error.
Actually, (lol) I did do that at first, and it gave the exact same error...

#4 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 posts

Posted 16 March 2013 - 03:30 PM

View PostPharap, on 16 March 2013 - 03:14 PM, said:

Actually, the title error you gave says line 23, the string "DynationOS" thing is the program name

around line 23 you have this:
local tCoords = {
    [1] = { 36, 50, 15, 16, "Create Account" },
	    [2] = { 2, 7, 15, 16, "Login" }, --this is line 23
  }

Your issue is the second comma, it implies that you're going to add another item to the table but you don't, you leave it blank, hence the error.

I believe you add the comma after each index.

#5 Spongy141

  • Members
  • 526 posts
  • Location'Merica

Posted 16 March 2013 - 03:39 PM

View PostDlcruz129, on 16 March 2013 - 03:30 PM, said:

View PostPharap, on 16 March 2013 - 03:14 PM, said:

Actually, the title error you gave says line 23, the string "DynationOS" thing is the program name

around line 23 you have this:
local tCoords = {
	[1] = { 36, 50, 15, 16, "Create Account" },
		[2] = { 2, 7, 15, 16, "Login" }, --this is line 23
  }

Your issue is the second comma, it implies that you're going to add another item to the table but you don't, you leave it blank, hence the error.

I believe you add the comma after each index.
Yeah I thought that too, but thing is, what is the problem with it? Since I do get an error either way...

#6 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 16 March 2013 - 03:39 PM

View PostDlcruz129, on 16 March 2013 - 03:30 PM, said:

View PostPharap, on 16 March 2013 - 03:14 PM, said:

Actually, the title error you gave says line 23, the string "DynationOS" thing is the program name

around line 23 you have this:
local tCoords = {
	[1] = { 36, 50, 15, 16, "Create Account" },
		[2] = { 2, 7, 15, 16, "Login" }, --this is line 23
  }

Your issue is the second comma, it implies that you're going to add another item to the table but you don't, you leave it blank, hence the error.

I believe you add the comma after each index.

Except the last one, because there are no more to come after it.

#7 Spongy141

  • Members
  • 526 posts
  • Location'Merica

Posted 16 March 2013 - 03:42 PM

View PostPharap, on 16 March 2013 - 03:39 PM, said:

View PostDlcruz129, on 16 March 2013 - 03:30 PM, said:

View PostPharap, on 16 March 2013 - 03:14 PM, said:

Actually, the title error you gave says line 23, the string "DynationOS" thing is the program name

around line 23 you have this:
local tCoords = {
	[1] = { 36, 50, 15, 16, "Create Account" },
		[2] = { 2, 7, 15, 16, "Login" }, --this is line 23
  }

Your issue is the second comma, it implies that you're going to add another item to the table but you don't, you leave it blank, hence the error.

I believe you add the comma after each index.

Except the last one, because there are no more to come after it.
Lol not to be rude... but can one of you just help me with why its having the error, since it does already just do the error anyways the the comma or no comma.

#8 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 16 March 2013 - 03:44 PM

View PostSpongy141, on 16 March 2013 - 03:39 PM, said:

Yeah I thought that too, but thing is, what is the problem with it? Since I do get an error either way...

The exact same error?
Even with the last comma removed?

#9 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 posts

Posted 16 March 2013 - 03:45 PM

View PostPharap, on 16 March 2013 - 03:39 PM, said:

View PostDlcruz129, on 16 March 2013 - 03:30 PM, said:

View PostPharap, on 16 March 2013 - 03:14 PM, said:

Actually, the title error you gave says line 23, the string "DynationOS" thing is the program name

around line 23 you have this:
local tCoords = {
	[1] = { 36, 50, 15, 16, "Create Account" },
		[2] = { 2, 7, 15, 16, "Login" }, --this is line 23
  }

Your issue is the second comma, it implies that you're going to add another item to the table but you don't, you leave it blank, hence the error.

I believe you add the comma after each index.

Except the last one, because there are no more to come after it.

Nope, according to the examples of tables provided in the Lua PIL, ALL indexes end in a comma.

#10 Kingdaro

    The Doctor

  • Members
  • 1,636 posts
  • Location'MURICA

Posted 16 March 2013 - 03:47 PM

Trailing commas are optional.

As for the problem at hand, I don't really see anything wrong with it. I even ran it and it worked fine.

...Well, I tried to register an account and I received "dynos-test:115: attempt to index ? (a nil value)", which is probably caused by me not having a DOS folder.

#11 Spongy141

  • Members
  • 526 posts
  • Location'Merica

Posted 16 March 2013 - 03:49 PM

*Face Palm* Sorry guys, I got the error cuz I was editing my cc emulator version, when I was trying to use it in reg minecraft, so the whole time nothing was wrong, I feel really stupid.

#12 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 16 March 2013 - 03:54 PM

View PostDlcruz129, on 16 March 2013 - 03:45 PM, said:

View PostPharap, on 16 March 2013 - 03:39 PM, said:


Except the last one, because there are no more to come after it.

Nope, according to the examples of tables provided in the Lua PIL, ALL indexes end in a comma.

Either way works in CC apparently, though I'm certain a comma following a nonexistant entry used to error.

View PostKingdaro, on 16 March 2013 - 03:47 PM, said:

Trailing commas are optional.

As for the problem at hand, I don't really see anything wrong with it. I even ran it and it worked fine.

...Well, I tried to register an account and I received "dynos-test:115: attempt to index ? (a nil value)", which is probably caused by me not having a DOS folder.

Nice to have a voice of reason.


View PostSpongy141, on 16 March 2013 - 03:49 PM, said:

*Face Palm* Sorry guys, I got the error cuz I was editing my cc emulator version, when I was trying to use it in reg minecraft, so the whole time nothing was wrong, I feel really stupid.

Well that's 8 minutes of my life gone lol
At least it's sorted now, that's the main thing.

#13 Kingdaro

    The Doctor

  • Members
  • 1,636 posts
  • Location'MURICA

Posted 16 March 2013 - 03:58 PM

I can only recall trailing commas being allowed in CC, because it always errored in Love2D. Maybe it's a Java thing.

#14 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 16 March 2013 - 04:01 PM

View PostKingdaro, on 16 March 2013 - 03:58 PM, said:

I can only recall trailing commas being allowed in CC, because it always errored in Love2D. Maybe it's a Java thing.
I wouldn't be surprised, Java can be quite picky at times lol





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users