- Home /
Strange error?! - Invalid IL - IL_001c: pop
Hi,
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?
Answer by seanr · Jul 15, 2015 at 01:32 PM
it is probably the return value.. make it return void
Filed bug 712460 on this.
Oh my, thanks so much! Been stuck on this for days no knowing what was going on! Changed it to a void and just 'return' and it doesn't error now!!
Thanks!! :D
Your answer
Follow this Question
Related Questions
[UNet] How I can send Command to non-player object? 1 Answer
Unity networking custom properties 0 Answers
UNet - Where does "normal" code run? 1 Answer
Unity Understanding Network 1 Answer