Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2015-02-24 19:00:38, last edited by Koya (2015-02-24 19:25:10)

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Unknown "add" error popped-up after the update

This was working fine until the most recent update

case "add":
{
    int id = m.GetInt(0);
    string username = m.GetString(1);
    Player p = new Player(id, username);
    p.Physics = world.Players[p.ID]; //Problem with this line
/*

An exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in mscorlib.dll but was not handled in user code
Additional information: The given key was not present in the dictionary.

*/
}

Anyone know why? or how to fix?


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#2 2015-02-24 19:13:03

capasha
Member
Joined: 2015-02-21
Posts: 4,066

Re: Unknown "add" error popped-up after the update

Have you checked so userid and username exists?

Offline

#3 2015-02-24 19:13:35, last edited by Zumza (2015-02-24 19:13:54)

Zumza
Member
From: root
Joined: 2015-02-17
Posts: 4,645

Re: Unknown "add" error popped-up after the update

I think you should verify the path where the new Player is add on world.Players


Everybody edits, but some edit more than others

Offline

#4 2015-02-24 19:25:21

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: Unknown "add" error popped-up after the update

capasha wrote:

Have you checked so userid and username exists?

Yes, both exist


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#5 2015-02-24 20:41:21

ZeldaXD
EE Homeboy
From: Cyprus
Joined: 2015-02-15
Posts: 1,539
Website

Re: Unknown "add" error popped-up after the update

I bet it is an error in relation with the removal of magic classes.


gLjTZE1.png

Offline

#6 2015-02-24 22:00:40, last edited by realmaster42 (2015-02-24 22:01:20)

realmaster42
Formerly marcoantonimsantos
From: ̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍
Joined: 2015-02-20
Posts: 1,380
Website

Re: Unknown "add" error popped-up after the update

Koya wrote:

This was working fine until the most recent update

case "add":
{
    int id = m.GetInt(0);
    string username = m.GetString(1);
    Player p = new Player(id, username);
    p.Physics = world.Players[p.ID]; //Problem with this line
/*

An exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in mscorlib.dll but was not handled in user code
Additional information: The given key was not present in the dictionary.

*/
}

Anyone know why? or how to fix?

I'll be honest, don't really know why it doesn't work...

but like Zumza said, did you make the world.Players dictionary add the id and username values before p.Physics line?


http://i.imgur.com/bjvgH5L.png?1

Offline

#7 2015-02-24 22:51:07, last edited by Koya (2015-02-24 22:51:19)

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: Unknown "add" error popped-up after the update

marcoantonimsantos wrote:
Koya wrote:

This was working fine until the most recent update

case "add":
{
    int id = m.GetInt(0);
    string username = m.GetString(1);
    Player p = new Player(id, username);
    p.Physics = world.Players[p.ID]; //Problem with this line
/*

An exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in mscorlib.dll but was not handled in user code
Additional information: The given key was not present in the dictionary.

*/
}

Anyone know why? or how to fix?

I'll be honest, don't really know why it doesn't work...

but like Zumza said, did you make the world.Players dictionary add the id and username values before p.Physics line?

Yes, it all worked fine before the update - so I'm guessing that the update messed around with the add message (which it did, class removal) but I haven't got a clue how to fix it.

// m.GetInt(0 ); = ID
// m.GetString(1); = Name
// m.GetInt(2); = Face
// m.GetInt(3); = X
// m.GetInt(4); = Y
// m.GetBoolean(5); = isGod
// m.GetBoolean(6); = isMod
// m.GetBoolean(7); = canChat
// m.GetInt(8); = Coins
// m.GetInt(9); = BlueCoins
// m.GetString(10); = Friends
// m.GetBoolean(11); = isClubMember
// m.GetBoolean(12); = isInGuardianMode

^Thanks to Jesse


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#8 2015-02-25 00:34:37

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: Unknown "add" error popped-up after the update

Does nobody else have this error or know why it has popped up?


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#9 2015-02-25 05:59:19

Lionhart
Member
Joined: 2015-02-17
Posts: 40

Re: Unknown "add" error popped-up after the update

Koya wrote:
// m.GetString(10); = Friends

What does this mean? I thought that was a boolean. (Too lazy to check atm)

Offline

#10 2015-02-25 08:15:27

goeyfun
Member
From: Mighty Japan
Joined: 2015-02-18
Posts: 667

Re: Unknown "add" error popped-up after the update

12 is now buildersclub bool?


Ug3JzgO.png

Offline

#11 2015-02-25 11:41:08

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: Unknown "add" error popped-up after the update

id, username, p
output:

3 squadfsalpha ProgramName.Program+Player
4 squadfsbeta ProgramName.Program+Player
1 squadfs ProgramName.Program+Player
3 squadfsalpha ProgramName.Program+Player
4 squadfsbeta ProgramName.Program+Player
5 squadfsgamma ProgramName.Program+Player
6 squadfsdelta ProgramName.Program+Player
7 squadfsepsilon ProgramName.Program+Player

Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#12 2015-02-25 17:38:47

realmaster42
Formerly marcoantonimsantos
From: ̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍
Joined: 2015-02-20
Posts: 1,380
Website

Re: Unknown "add" error popped-up after the update

Koya, you could make your life easier by using Add (if im wrong you surely know what i mean)

if (!world.Players.ContainsKey(m.GetInt(0))               (somethin like dat)
          world.Players.Add(m.GetInt(0), m.GetString(1))

If that doesn't work, try putting below Player p:

MessageBox.Show("Values Got", m.GetInt(0).ToString() + " and the value is " + m.GetString(1));

http://i.imgur.com/bjvgH5L.png?1

Offline

#13 2015-02-25 21:54:19

ewoke
Member
Joined: 2015-02-20
Posts: 412

Re: Unknown "add" error popped-up after the update

is p.Physics declared?


if you can read this....good for you

Offline

#14 2015-02-26 10:46:49

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: Unknown "add" error popped-up after the update

Found the error (thanks to Jesse), it's with EEPhysics - needs updating


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

Koya1424944009476945

Board footer

Powered by FluxBB

[ Started around 1715012257.524 - Generated in 0.056 seconds, 11 queries executed - Memory usage: 1.56 MiB (Peak: 1.73 MiB) ]