Strange error?! - Invalid IL - IL_001c: pop


I started changing some of my code today so that it works over the network however it now seems to give out this error now?

It worked before I put [Command] above the function, I did this as I want this code to run on just the server as the server will have control over my player manager.

From what I can tell its this function that gives out the error, no matter where its called from, for example its called once when the game begins and once when you click a button to register a new user and both produce the error.

This is some testing the water early development stuff it doesn’t take anything into account security wise for dealing with passwords and stuff, its just for my testing at the moment

I read somewhere that it could be something to do with the compiler not being able to compile short hand properly so i tried changing :

public void Button ()
playerManager.GetComponent().instance.CmdNewPlayerCheck(emailAdress.text, userName.text, passCode.text);

to :

public void Button ()
S_PlayerManager pm;
pm = playerManager.GetComponent();
pm.instance.CmdNewPlayerCheck(emailAdress.text, userName.text, passCode.text);

That didn’t work and I cant find many examples of a fix for this, any suggestions on whats causing the error?

it is probably the return value… make it return void

Filed bug 712460 on this.