Hello, not sure if this will help, but have u tried replacing "(word==0)" with "(!word)"
Not even sure if this will work sorry. But im in the processes of learning EG2 so forgive me if i have just lost my remaining dignity. lol.
Hey guys,
I just started a new script for a console screen, so i tried to convert string to ASCII & output it on the screen
Here's what i had:
But the problem is,Code:@name LASER OS 2.0 by depth08/The_Raf @inputs Clk Key Reset Console:wirelink @outputs Reset @persist A Print:string PrintColor PrintColor=161 Print="hellowwworld" if (Word==0) { Char=toByte(Print,A) Console:writeCell(2*A-2,Char) Console:writeCell(2*A-1,PrintColor) A+=1 interval(2) if (A==Print:length()) {Word==1} }
That ^Code:timer error includes extensions math lua 66 attempt compare nil number
When i update my gate, everything goes just fine, i see my string appear on the screen, but after a while, the error pops up, & the screen goes dead. reloading the chip doesn't work.
I have to make a new screen in order to let the system work [& crash] again
I've already figured out 1 thing, the smaller the interval, the faster the character display, but also, the faster the error comes up again.
I'm out of ideas, can anybody figure it out for me??![]()
Hello, not sure if this will help, but have u tried replacing "(word==0)" with "(!word)"
Not even sure if this will work sorry. But im in the processes of learning EG2 so forgive me if i have just lost my remaining dignity. lol.
{Word==1}
You can't do that.
It should be {Word=1}
And you should set A to 1 before you begin.
Otherwise Char=toByte(Print,A) is trying toByte the 0th character of your string.
Which obviously isn't possible.
Please provide copies of the error messages, and not just "something similar". Anyway, the problem is when it's calling interval(N)... for some reason, the interval-implementation doesn't receive an argument (NIL). I have never heard of this before and can't really see how it could ever happen. But more the interval(2), to somewhere else.
If that error message is what it looks like.
Bookmarks