Forum

> > CS2D > Scripts > Back To The Future MOD
Forums overviewCS2D overview Scripts overviewLog in to reply

English Back To The Future MOD

4 replies
To the start Previous 1 Next To the start

old Back To The Future MOD

Marcell
Super User Off Offline

Quote
Spoiler >

Anybody else know whats wrong with this code?
I got null error, when click to Enable

old Re: Back To The Future MOD

Yates
Reviewer Off Offline

Quote
Attempt to call a nil value probably means you have added a hook, but not a function for that hook.

old Re: Back To The Future MOD

Marcell
Super User Off Offline

Quote
Hope it will helps

Edit:
sys/lua/bttf.lua:95: attempt to call local 'etc' (a nil value)

but it's not nil....

old Re: Back To The Future MOD

Alistaire
User Off Offline

Quote
Dude.

1
2
3
4
5
6
7
8
9
10
11
12
13
function idlemenu(id,title,button,etc)
     if title=="Time Machine" then
          if button==1 then
               timecircuitstate[1]="ON"
               timecircuitstate[2]="OFF"
          elseif button==2 then
               timecircuitstate[1]="OFF"
               timecircuitstate[2]="ON"
          end
            etc()
          menu(id,"Time Machine,Enable Time Circuit|"..timecircuitstate[1]..",Disable Time Circuit|"..timecircuitstate[2].."")
     end
end

1
function idlemenu(id,title,button,etc)
1
etc()

The parameter etc isn't a function so obviously it won't do stuff. Be sure to make your functions descriptive as well, "etc" is a useless function name.

old Re: Back To The Future MOD

Marcell
Super User Off Offline

Quote
i fixed everything, i haven't got any error... anyway, i did a wrong script, because i wanted that when i press F2 a menu will show with this option Time Circuit(ON) if i press it
then it going to be set OFF
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview