←  Ask a Pro

ComputerCraft | Programmable Computers for Minecraft

»

Negative line number for error debug info

EveryOS's Photo EveryOS 31 May 2018

Posted Image

This is not very useful because I do not know what line it is. Do you know what a negative line number means?

Source is here
Edited by EveryOS, 31 May 2018 - 04:19 PM.
Quote

Bomb Bloke's Photo Bomb Bloke 31 May 2018

Just with a quick glance through, this might be causing it. A call to that function would produce the indexing error, as "queue" has no elements (... and never will), so #queue[0] crashes.

Beats me about the line number. I've got a vague idea that it means the VM doesn't know where the function was defined. Not really sure. This isn't CC:Tweaked, is it? I reckon that'd give you a lot more information to work with.
Quote

EveryOS's Photo EveryOS 31 May 2018

Not CC:Tweaked, just CC dev environment run with gradlew runClient
Quote

SquidDev's Photo SquidDev 31 May 2018

env.load(string.dump(myclass), OSName..":"..class, "tb", env)
This is the issue: LuaJ has a bug (feature?) where debug information is stripped when using string.dump, thus line numbers are all -1. You're better off reading the file's contents and passing it into load directly - there's very rarely a reason to use string.dump.

View PostEveryOS, on 31 May 2018 - 04:55 PM, said:

Just CC dev environment run with gradlew runClient
For crying out loud, Minecraft costs the same as 4 cups of coffee or 3 beers.
Edited by SquidDev, 31 May 2018 - 05:59 PM.
Quote

EveryOS's Photo EveryOS 31 May 2018

Thanks, did not really think about that
Clarification: As in, the first half of that comment
Edited by EveryOS, 31 May 2018 - 06:16 PM.
Quote

EveryOS's Photo EveryOS 31 May 2018

View PostSquidDev, on 31 May 2018 - 05:59 PM, said:

For crying out loud, Minecraft costs the same as 4 cups of coffee or 3 beers.
How much would that be?
Do they sell coffee at the dollar tree?
What are the inflation rates in your area?
Quote

Desolstice's Photo Desolstice 31 May 2018

View PostEveryOS, on 31 May 2018 - 06:23 PM, said:

View PostSquidDev, on 31 May 2018 - 05:59 PM, said:

For crying out loud, Minecraft costs the same as 4 cups of coffee or 3 beers.
How much would that be?
Do they sell coffee at the dollar tree?
What are the inflation rates in your area?

It is looked down upon to pirate software in a software based forum. You might think its funny but it really isn't.
Quote

EveryOS's Photo EveryOS 01 Jun 2018

I had have minecraftedu (so in a way I do have minecraft), and there is no verification when you download minecraft from files.minecraftforge.net
Quote

SquidDev's Photo SquidDev 01 Jun 2018

View PostEveryOS, on 01 June 2018 - 11:20 AM, said:

I had have minecraftedu (so in a way I do have minecraft), and there is no verification when you download minecraft from files.minecraftforge.net
Your point being? Piracy isn't limited to torrents, it's any attempt to subvert the normal payment requirements of a piece of software. The whole issue is you're basically saying "I don't think developers deserved to be payed for their work", which is obviously rather problematic on a forum populated largely by programmers.
Quote

EveryOS's Photo EveryOS 01 Jun 2018

View PostEveryOS, on 01 June 2018 - 11:20 AM, said:

I had have minecraftedu (so in a way I do have minecraft)
That, I believe, was legally obtained, and it is basically minecraft
Quote

EveryOS's Photo EveryOS 01 Jun 2018

In addition I have Xbox 360 edition, legally obtained. I'll get the cpu edition when I turn 18
Quote

H4X0RZ's Photo H4X0RZ 04 Jun 2018

Ok? Still, what's your point?
Quote

Sewbacca's Photo Sewbacca 28 Jun 2018

View PostSquidDev, on 31 May 2018 - 05:59 PM, said:

For crying out loud, Minecraft costs the same as 4 cups of coffee or 3 beers.

Erm... Where do you buy your coffee? I mean, where does a cup of coffee cost $6? :lol:
Quote

Nothy's Photo Nothy 09 Jul 2018

View PostSewbacca, on 28 June 2018 - 03:26 PM, said:

Erm... Where do you buy your coffee? I mean, where does a cup of coffee cost $6? :lol:

Stockholm, Sweden
Quote