Jump to content


GopherAtl

Member Since 19 Aug 2012
Offline Last Active Jun 16 2019 07:55 PM
*****

Posts I've Made

In Topic: CC seems to be dead.

19 April 2019 - 12:19 AM

CraftOS 2.0 was never intended to be a CC/MC thing at all - it was a lua API for game development based on CC's APIs. That detail aside, what Lupus said.

In Topic: Turn user input to code?

13 April 2019 - 12:44 AM

what he said. I did see your edit, and added on additional info that seemed highly relevant. AAP is an archive resource as well as a live one.

In Topic: Turn user input to code?

12 April 2019 - 11:50 AM

Actually throwing errors on user-entered code like that seems a bad idea, typos happen and you'll have to handle it gracefully or just have the program crash every time the user doesn't get the code they're entering perfect the first time. You'll want to use pcall() to call the function once loadstring() has done the parsing, I'd recommend something more like this:

function executeCode(codeString)
    --try to parse the string as code
    local func,err=loadstring(codeString)
    local success=false
    --did we succeed?
    if func then
   	 --have a func, safely call it and catch the result
        success,err = pcall(func)
    end

    return success,err
end

Simple use example:
while true do
    write("]")
    local succ,err=executeCode(read())
    if succ then
        print("code executed!")
    else
        print("error:"..err)
    end
end

In Topic: Bundled Cable Support

08 April 2019 - 12:28 PM

aaah, it wasn't deleted, just split and moved! Would be nice of the forum software had notified me of this, or at least corrected it's own links to replies, but apparently I stumbled into it.

@Bomb Bloke I didn't know PR:Compat was even a thing, so that is probably my problem, yes. I feel dumb now. Seems an odd design choice to have it *be* a separate thing, to me, but w/e.

Of course, if SimpleLogic Wires has the wires without all the other stuff, I'm probably going to go that route instead, anyway - literally all I want from P:R is that, and if Ender IO's had compatibility, I wouldn't need either.

Thanks everyone for the help/info!

In Topic: Bundled Cable Support

07 April 2019 - 11:08 PM

View PostBomb Bloke, on 06 April 2019 - 03:50 AM, said:

I haven't done much experimentation with inter-mod compatibility since MC1.7.10, as it's seemed to me that it's been relatively easy to find working combinations from MC1.8 onwards. Certainly it looks to me like ProjectRed should be working in MC1.12 (so long as you don't make the mistake the linked user did!).

Yeah, no, with latest versions of CC:T and CC and latest versions of P:R, bundled cables do not connect to computers. I didn't dig around trying various recent versions, but did make sure I was using the latest of all mods for 1.12.2

View PostSquidDev, on 06 April 2019 - 07:40 AM, said:

<snip!>
If the mod has an API, I generally try to add support on my end - that's what I've done for SimpleLogic Wires. It's just sadly a lot of mods don't really seem to expose any way of adding your own support - it has to be baked into them. I'll definitely have another look at EnderIO and P:R compat. I don't tend to play heavily modded packs these days, so don't really notice these integration issues - sorry for not picking this up earlier :/.

Oh, will try simplewires at some point; if there is literally a single form of bundled cables that works, that's enough to keep me happy. Even if it doesn't work, frankly, I'd recommend not going out of your way if I'm the only person who's even noticed, or at least, cared enough to even mention it. Cheap as CC computers are, most people seem perfectly happy to throw down computers at every control point; I just personally enjoy making a single, central computer do it all. Your no-doubt limited time would be better spent on stuff people *do* care about, whether that's stuff more players want or stuff that makes CC less scary for servers.