Page 1 of 1

LitJson.JsonData defined multiple times

Posted: 03 Feb 2010, 01:14
by AngryGerman
I copied the Json data response code from the documentation

Code: Select all

// Handle JSON responses
else if (type == SmartFoxClient.XTMSG_TYPE_JSON)
{
   JsonData responseData = (JsonData)data;
   // TODO: check command and perform required actions
}


and added using LitJson; to the script, but I get an error saying that it is defined multiple times. I checked and it's nowhere else in the script. If I take the using line out, the compiler error changes to "The type or namespace name `JsonData' could not be found. Are you missing a using directive or an assembly reference?" so I believe I don't define it more than once.

Does anyone know why the compiler complains about it being defined multiple times?

thanks

Posted: 04 Feb 2010, 21:22
by ThomasLund
"The type or namespace name `JsonData' could not be found. Are you missing a using directive or an assembly reference?"

Thats only a warning and can be safely ignored. Unity doesnt like namespaces, but it has no pratical effect. You do not need to add another using statement

/Thomas

Posted: 16 Oct 2010, 11:56
by vooood
ThomasLund wrote:"The type or namespace name `JsonData' could not be found. Are you missing a using directive or an assembly reference?"

Thats only a warning and can be safely ignored. Unity doesnt like namespaces, but it has no pratical effect. You do not need to add another using statement

/Thomas


what if it's an error and you can't ignore it? the editor declared this as an error and I can't work with it.

Code: Select all

using LitJson
did not help because then we have another error..

Posted: 17 Oct 2010, 08:27
by ThomasLund
vooood wrote:what if it's an error and you can't ignore it? the editor declared this as an error and I can't work with it.


*Shrugs*

Unity editor says its a warning, so why you speculate about it being an error is up to you.

Its a warning due to namespace declarations and can safely be ignored. Trust me.

/Thomas