RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Undefenied Variables ?

Nova

Wanderer
Undefenied Variables ?

Hi,
if I have a function that defenies string hello = "hi";

then I use the function and directly after the function I use
[code:1]If( hello == "hi" ) { bla; }[/code:1]
The compiler says hello is not defenied.
What can I do in such a situation ?

And in the function there is the error that hello is definied but never used. :(

-Nova
 

Delta

Wanderer
Problem might be when you defined Hello. Make sure they are exactly the same C# is a case sensitive Language.
 

Tom Bombadil

Wanderer
if you add a boolean value to Compare you can abilitate or no the case-sensitive, if you put true the case-sensitive is on
for non case-sensitive :
[code:1]
if ( String.Compare(hello,"hi",false) == 0 ) { bla; }
[/code:1]
 
Top