Lua not working :/

  • ACHIEVERjunior
    4th Nov 2012 Member 0 Permalink

    Hey, there's a problem, when I make a .lua file with the coding in, nothing changes, (no I didn't make the codes), so what's the problem? can I fix it?

  • jacob1
    4th Nov 2012 Developer 0 Permalink
    @ACHIEVERjunior (View Post)
    Can I see the lua file? I can't tell what's wrong with it without seeing that. Or, if you are using someone else's, I need to know which one.

    Lua code can go in autorun.lua, and it will automatically run at startup. If it's not named that, you have to type dofile("asdf.lua") into the console, where asdf.lua is the name of the file (it's probably something else)
  • ACHIEVERjunior
    4th Nov 2012 Member 0 Permalink

    I did put it in autorun.lua, but is says something like "autorun.lua:1 name already in use" and I just copied and pasted a couple off of the forums. each one didn't work

    edit>It's ok! thanks, dofile(file) works but I have no idea why autorun doesn't

    edit2> which button do I press to change one element to another with the cursor? it used to be ; but now it doesn't. has it changed?

  • jacob1
    4th Nov 2012 Developer 0 Permalink
    @ACHIEVERjunior (View Post)
    tpt was rewritten into c++, so that hasn't been added back yet. It will be soon. And can I see what script it was anyway? That might be a problem with the script.
  • jacob1
    4th Nov 2012 Developer 0 Permalink
    @ACHIEVERjunior (View Post)
    I couldn't see the problem (it worked for me), but it might have been fixed already. Make sure you are using version 84
  • ACHIEVERjunior
    4th Nov 2012 Member 0 Permalink

    http://pastebin.com/Vk88tTMD this one will not work, when I name the file something random and try to dofile, it says the name is already in use

  • jacob1
    4th Nov 2012 Developer 0 Permalink
    @ACHIEVERjunior (View Post)
    I can't figure out what's wrong, it's possible all old lua script elements don't work in tpt++ (I would hope not though). Maybe Simon only enabled the new way of creating custom elements.
  • ACHIEVERjunior
    4th Nov 2012 Member 0 Permalink

    .........oh well......

  • The-Fall
    4th Nov 2012 Member 0 Permalink

    New way of creating elements?