Jump to content
  • Advertisement
Sign in to follow this  
Pedro Alves

problem change screen xna

This topic is 1509 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

the problem is execute the game and make the login if the StateManager.PushState(GameRef.StartMenuScreen); in the function private void ProcessComplete(Headers header, ErrorCodes Erro)

give a message of server is offline

i put my interecode in github

this is the link to my code https://github.com/Kammikazy/Firstgame

Edited by Landi20

Share this post


Link to post
Share on other sites
Advertisement

Sounds more like a hack to make it work, since the setting name suggests cross-thread calls are actually illegal. If you have time you should check your code to make sure you're not accessing the GUI from multiple threads, before your code becomes too big to fix - this kind of concurrency issue is sure to come bite you again later on (this warning is actually there to alert you of it, since they can be hard to detect and track down).

Share this post


Link to post
Share on other sites

thanks for advice but this is a tempory fix

what you sujest to fix my problem

how i fix the problem not using this code System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;

this is my issos when i dont use System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;

A first chance exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll
'TomShane.Neoforce.Central.exe' (CLR v4.0.30319: TomShane.Neoforce.Central.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_pt_b77a5c561934e089\mscorlib.resources.dll'. Module was built without symbols.
ERROSystem.InvalidOperationException: A operação entre threads não é válida: controlo 'GameForm' acedido a partir de um thread diferente do thread onde foi criado.
   em System.Windows.Forms.Control.get_Handle()
   em System.Windows.Forms.Control.set_Cursor(Cursor value)
   em TomShane.Neoforce.Controls.Manager.SetCursor(Cursor cursor)
   em TomShane.Neoforce.Controls.Manager.SetSkin(Skin skin)
   em TomShane.Neoforce.Controls.Manager.SetSkin(String name)
   em TomShane.Neoforce.Controls.Manager.Initialize()
   em TomShane.Neoforce.Central.Code.server.Initialize() em c:\Users\Pedro\Dropbox\GAMES\TomShane.Neoforce.Controls.XNA4\Neoforce\Source\Central\Code\server.cs:line 283
   em Microsoft.Xna.Framework.Game.GameComponentAdded(Object sender, GameComponentCollectionEventArgs e)
   em Microsoft.Xna.Framework.GameComponentCollection.OnComponentAdded(GameComponentCollectionEventArgs eventArgs)
   em Microsoft.Xna.Framework.GameComponentCollection.InsertItem(Int32 index, IGameComponent item)
   em System.Collections.ObjectModel.Collection`1.Add(T item)
   em XRpgLibrary.GameStateManager.AddState(GameState newState) em c:\Users\Pedro\Dropbox\GAMES\TomShane.Neoforce.Controls.XNA4\Neoforce\Source\XRpgLibrary\GameStateManager.cs:line 81
   em XRpgLibrary.GameStateManager.PushState(GameState newState) em c:\Users\Pedro\Dropbox\GAMES\TomShane.Neoforce.Controls.XNA4\Neoforce\Source\XRpgLibrary\GameStateManager.cs:line 74
   em TomShane.Neoforce.Central.Code.TitleScreen.ProcessComplete(Headers header, ErrorCodes Erro) em c:\Users\Pedro\Dropbox\GAMES\TomShane.Neoforce.Controls.XNA4\Neoforce\Source\Central\Code\TitleScreen.cs:line 249
   em TomShane.Neoforce.Central.Code.LoginClient.process(Object o) em c:\Users\Pedro\Dropbox\GAMES\TomShane.Neoforce.Controls.XNA4\Neoforce\Source\Central\Code\LoginClient.cs:line 57

Edited by Landi20

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!