Scripts / New Scripts or Altered Scripts not working

Author
Message
TazMan
GameGuru TGC Backer
13
Years of Service
User Offline
Joined: 20th Jan 2011
Location: Worldwide Web
Posted: 6th Mar 2014 13:00
Hello again



I haven't played with the scripts part of the new beta until today, I created a gate that opens and closes so I thought that I would try it out.



I put the gate into FPSCR and then got one of the scripts for opening and closing without a key and set it as the main script for the entity. The new script was called dooropenwithoutkey.lua. When I ran it I got an error as in the image below.







I tried restarting the program with the new script in place still the same. So I decided to try and change the door script already in place and then restart the program, still the same error.



I also tried renaming the original door script, restarting the program and setting the new name of the door script as the main script for the gate, now this worked originally when it was called door.lua but not when I changed its name.



No matter what I do the program only seems to allow me to use the original scripts, am I missing something??



Please can anyone help

I've got something to say

----

It's better to burn out than fade away.
AuShadow
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 2nd Dec 2013
Location: Australia
Posted: 6th Mar 2014 14:20
The file name must also be the same as the function name inside the script so if your file is called door.lua then the function inside the script would be door_main(e)

PC Specs: Windows 7 home 64-bit, Amd 7900 3gb DDR5 graphics, 8gb DDR3 Ram, Intel i7 3.4ghz

Feel free to visit and edit the public FPSCR resource wiki page: http://fpscrresource.wikispaces.com/home
TazMan
GameGuru TGC Backer
13
Years of Service
User Offline
Joined: 20th Jan 2011
Location: Worldwide Web
Posted: 6th Mar 2014 16:45
Thanks AuShadow I knew it would be something obvious

I've got something to say

----

It's better to burn out than fade away.
AuShadow
GameGuru TGC Backer
10
Years of Service
User Offline
Joined: 2nd Dec 2013
Location: Australia
Posted: 10th Mar 2014 14:02
No problem, hope it helped

PC Specs: Windows 7 home 64-bit, Amd 7900 3gb DDR5 graphics, 8gb DDR3 Ram, Intel i7 3.4ghz

Feel free to visit and edit the public FPSCR resource wiki page: http://fpscrresource.wikispaces.com/home

Login to post a reply

Server time is: 2024-05-06 10:29:26
Your offset time is: 2024-05-06 10:29:26