LitJson.JsonData defined multiple times

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

AngryGerman
Posts: 1
Joined: 03 Feb 2010, 00:54
Location: San Francisco, CA

LitJson.JsonData defined multiple times

Postby AngryGerman » 03 Feb 2010, 01:14

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
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 04 Feb 2010, 21:22

"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
vooood
Posts: 45
Joined: 08 Oct 2010, 09:04
Location: Croatia
Contact:

Postby vooood » 16 Oct 2010, 11:56

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..
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 17 Oct 2010, 08:27

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

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 17 guests