139 posts
Posted 15 March 2014 - 09:28 PM
Im trying to port this: http://powdertoy.co....ml?Thread=16546 to cclua and to use bigInt.
I have a (working) program but it doesnt give any output no matter how many times you run it.
Can somebody tell me where is the error?
pastebin: http://pastebin.com/CDPWY8KSEdit: Im using a new bigInt from
https://bitbucket.org/tedu/bigintlua/src/56ec909773a11c9cc910882b56e3b1c66014b687/bigint.luahttp://pastebin.com/CDPWY8KS Now the error is on the line 108: attempt to compare __lt on table and number
Edited on 15 March 2014 - 11:57 PM
1281 posts
Posted 15 March 2014 - 11:15 PM
doesnt give any output
Any output at all, or just no number output?
Also that yield function is not nessacary, just use sleep(0).
139 posts
Posted 15 March 2014 - 11:59 PM
any output at all just a blank line, and i want to be eficient with the yields but also when i do it i want to wait a sec after so you can see the current value
1281 posts
Posted 16 March 2014 - 12:21 AM
That yield function has got to go then, since it will only wait if your program has been running for over 2 seconds. Replace it with a sleep(1), and the program will wait 1 second between each run.
Edited on 15 March 2014 - 11:27 PM
139 posts
Posted 16 March 2014 - 12:31 AM
I found the problem, i forgot that i use negatives number in one point so i cant use bigInt.Nobody knows a computercraft implementation of bigInt that supports negatives of a pure lua one that i can port?
Edit: Nevermind found one, i will port it and use it
Edited on 15 March 2014 - 11:44 PM
139 posts
Posted 16 March 2014 - 12:54 AM
1281 posts
Posted 16 March 2014 - 12:59 AM
Ugh, im getting pretty tired of these. When using someone else's code, use your head and do the logical thing, ask the person who made it.
139 posts
Posted 16 March 2014 - 01:03 AM
Ugh, im getting pretty tired of these. When using someone else's code, use your head and do the logical thing, ask the person who made it.
Alone his code works, mine doesnt thats why i post here also that program is from the year 2000…
1281 posts
Posted 16 March 2014 - 01:15 AM
Alone his code works, mine doesnt thats why i post here also that program is from the year 2000…
-- Copyright (c) 2010 Ted Unangst <ted.unangst@gmail.com>
Year 2000…. right >.>.
That dosen't change the fact that he knows his own code better than we probably ever will, or will ever aspire to. We are here to help you with
your code, not someone's code whom we can't ask functional questions of.
8543 posts
Posted 16 March 2014 - 02:21 AM
Let's tone it back a little bit. Help, fantastic. Don't want to help, don't help. No need to get quite that hostile toward people for asking questions.