There is an error in the consle but my script still works.

in the console it say

Requested item "S" does not exist

but my scipt still works perfectly as if it can still find the sensor that “does not exist” this error is wierd because this sensor is set up just like the one before it, and it worked fine. This is for a view chager using an axis. here is the script. it works fine but the error in the console is anoying.

import bge
GameLogic = bge.logic
cont = GameLogic.getCurrentController()
own = cont.owner
p1 = GameLogic.getCurrentScene().objects["p1"]
Axis =  cont.sensors["C"]
StS  =  cont.sensors["S"]
p1L =  cont.sensors["P"]

A = Axis.axisValues
C1 = cont.actuators["C1"]
A2 = int(A[2])
A3 = int(A[3])

if abs(A[2]) <= 5000 and abs(A[3]) <= 5000:
 A2 = 0
 A3 = 0
S = .00002
StS.distance = 20.78
StS.resetDistance = 20.78

if StS.positive or p1L.positive:
 A3 = 0

C1.dLoc = [S * A2,-S* A3,0 * A3]


sorry its a work in progress and a little bit wastefull. i think i may have repeated things or added unnessesary things. oh well. Is there any reson it would do this?

If you do not get a stack trace this is not a problem of the sensor.
If the sensor would not exist you would get a KeyError.

I can’t remember if I ever saw such warning.

I think we need a test blend.

That’s new to me to!
Also, i would recommend using cleaner names for variables - PEP8#

I just saved my .blend and it just flat out stoped doing it. Realy wierd. oh well its fixed now. :spin: