Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Sensor - Light

Author
Message
SporteFre
15
Years of Service
User Offline
Joined: 14th Apr 2009
Location: Biohazard 2
Posted: 17th Apr 2009 22:12 Edited at: 17th Apr 2009 22:45
Im creating sort of a Sensory light like the ones you have on your porch well i write a script and it dosent seem to work could anybody help me with this.



" Obsess over obssessions and you will find creativity " Ryan Sur
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 17th Apr 2009 22:53
For starters, you never move from State 1 to State 2, which means the light (assuming it turns on) never turns off.

Secondly, even if you did move to State 2, you never set Activated to 1. This means that if you move to State 3, the light will never turn off.

Thirdly, you aren't checking for states correctly. It should be state=0, not state0.

And although you didn't explain what the problem was, the above 3 points clarify why your script doesn't work. Simply put, there are too many errors in your script for it to work. I applaud you for taking the time to at least try to script (and trust me, it gets easier). Try the following and let us know if this works (I'm not at my home pc, so I may miss a command or two):



Priest of the Church of Joe Wood
SporteFre
15
Years of Service
User Offline
Joined: 14th Apr 2009
Location: Biohazard 2
Posted: 17th Apr 2009 23:07
Oh. sorry i am Very new to this its my first script. thank you for the support i very much appreciate it and i will go and test it now.

" Obsess over obssessions and you will find creativity " Ryan Sur
SporteFre
15
Years of Service
User Offline
Joined: 14th Apr 2009
Location: Biohazard 2
Posted: 18th Apr 2009 03:45
Works 100% everything is working perfectly. i very much appreciate the effort,support and help.

" Obsess over obssessions and you will find creativity " Ryan Sur
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 24th Apr 2009 06:10

I know SporteFre told you, but I wanted to try to make it too! Get fpi editpad and scripting will be a whole lot easier! It has a list of conditions and actions and explains them. It makes scripting really easy.

fgadzsv bla bla bla

Login to post a reply

Server time is: 2024-11-24 23:22:33
Your offset time is: 2024-11-24 23:22:33