- Home /
Does not exist in the current context
I have 2 questions;
A) what does this mean
B) how can I sort it out
Its a c-sharp script which I want to allow more sevsitive movement (camera looking) when you zoom in.
if (Scoping2.iszoomed == 0)
{
sensitivityX = 15F;
sensitivityY = 15F;
}
else if (Scoping2.iszoomed == 1)
{
sensitivityX = 5F;
sensitivityY = 5F;
}
Please post a bit of the code that is giving you the error, else we won't be able to help you. It sounds like you are trying to refer to an object that doesnt exist.
This answer contained a followup on the question with code sample that now have been appropriately moved to the question.
Answer by Statement · Jan 10, 2011 at 06:31 PM
It should mean that either you haven't declared Scoping2, sensitivityX or sensitivityY in the code scope hierarchy. Maybe you have declared the variables in another method?
You should fix your code so that your variables are declared within the same scope. Maybe you mis spelled something?
I could probably give more detailed help if you exposed the whole script, or at least the function and the variable declarations.
Answer by kumarc123 · Feb 17, 2014 at 06:24 AM
Hello,
Try this in your code.
using System;
or
System.DateTime
Your answer
Follow this Question
Related Questions
Script compile errors with following hack & slash tutorial 2 Answers
CS0103 error when building scenes 0 Answers
Underwater Blur Effect Help 1 Answer
Accessing a js static var from a c# script 1 Answer
Error cs0103 name CurMenu does not exist 2 Answers