Friday, April 30, 2010

Language Discrimination

Photobucket

I had a funny thing happen to me just now. I couldn't get any help in Unity's IRC chat channel because I use Unityscript, Unity's version of Javascript, instead of the more sophisticated C# language.
[11:41] <_underdog> hi all
[11:41] <_underdog> I got a question
[11:42] <_underdog> when I put a yield WaitForSeconds in my function, Unity gives me the error "The return type of a generator must be either 'System.Collections.IEnumerable' or 'object'."
[11:42] <_underdog> any idea why?
[11:43] <blitzwing> language?
[11:43] <tigeba> http://unity3d.com/support/documentation/ScriptReference/index.Writing_Scripts_in_Csharp.html
[11:43] <_underdog> unityscript
[11:43] <blitzwing> learn C#.
[11:43] <_underdog> why whats wrong?
[11:44] <blitzwing> its js... you're stunting you're abilities
[11:44] <_underdog> what's wrong with js?
[11:44] <_underdog> what does it have to do with the problem at hand?
[11:45] <blitzwing> the only people answering you are C# coders :)
[11:45] <_underdog> discrimination :(
[11:45] <dr_link> Shame how C# is Microsoft made. :(
[11:45] <blitzwing> not really
[11:45] <_underdog> yes it is
[11:45] <blitzwing> MS put a lot of time into it
[11:45] <dr_link> Not necessarily this version of C#
[11:46] <blitzwing> Anders Hilgberg was Mr Delphi.
[11:46] <dr_link> lol @ his name
[11:46] <dr_link> anyway
[11:46] <_underdog> I hate Microsoft btw
[11:47] <blitzwing> good for you.
I was given some help later on.
[11:49] <tigeba> _underdog: FWIW when people ask about that error its usually because they are using C# but trying to use the unityscript syntax
[11:50] <tigeba> for the coroutine
[11:50] <_underdog> hmmm I see, its weird tho, I'm using unityscript all the way
[11:51] <tigeba> try the coroutine example
[11:51] <blitzwing> well its not wierd, thats just a common mistake people new to C# make
[11:51] <tigeba> in the docs, it should work
[11:51] <blitzwing> seeing you're not using C#, it doesn't appy to you

No comments:

Post a Comment

Made me post. 0/10.