PlayerList crashes game
by Danny Reid · in Torque Game Engine Advanced · 03/12/2009 (11:31 am) · 6 replies
I'm working with 1.7.1 trying to implement the scoreboard for multiplayer. I thought I had found everything I needed in the stronghold example and through commented code provided, but when I press F2 an unhandled win32 exception occurs. The console doesn't give me much, but I added some echos and know that my bind works, the showPlayerList function is called, PlayerListGui::Toggle is called, and the dialog is pushed, then the crash occurs. I would be less concerned if it simply wasn't working, but the crash seems like an odd problem to fix.
I don't know where to go from here, I've got the PlayerList.cs and .gui. The execs for those scripts are uncommented and there doesn't seem to be any problems when loading them. I can't find anything different in the Stronghold project either. Any help would be appreciated.
I don't know where to go from here, I've got the PlayerList.cs and .gui. The execs for those scripts are uncommented and there doesn't seem to be any problems when loading them. I can't find anything different in the Stronghold project either. Any help would be appreciated.
#2
Thanks for the suggestion though, slowly whittling down the possibilities.
03/12/2009 (1:19 pm)
I don't seem to get any dialog explanation, Visual Studio just tries to debug for me, then provides nothing for me to look at. There isn't a profile by that name (GuiBitmapBorderProfile), but there isn't a profile in Stronghold either and that doesn't crash. Either way, I tried using the BorderCtrl profile used for the chat hud and it didn't make a difference. Thanks for the suggestion though, slowly whittling down the possibilities.
#3
You'll have to copy the file \Stronghold\game\scriptsAndAssets\client\ui\chatHudBorderArray.png into your game somewhere, I put mine in common/gui/images
Next edit the file common/gui/profiles.cs and add this anywhere in the file:
Should solve the issue.
03/13/2009 (4:42 am)
@Danny - It's a bug that I've come across and solved, Steven is quite correct it's an issue with GuiBitmapBorderCtrl missing - here's what I did to resolve this.You'll have to copy the file \Stronghold\game\scriptsAndAssets\client\ui\chatHudBorderArray.png into your game somewhere, I put mine in common/gui/images
Next edit the file common/gui/profiles.cs and add this anywhere in the file:
if(!isObject(GuiBitmapBorderProfile)) new GuiControlProfile(GuiBitmapBorderProfile)
{
bitmap = "./images/chatHudBorderArray";
hasBitmapArray = true;
};Should solve the issue.
#4
03/13/2009 (5:07 am)
Thanks Andy, im not near as crazy as i thought i was. My old TGE GUI codes work as a direct drop into TGEA now.
#5
03/13/2009 (8:54 am)
Seems to work just fine now. Thanks for the help!
#6
03/13/2009 (1:49 pm)
Great to hear it :)
Torque 3D Owner Steven Garcia
I know I'm not running the same version as you ( working in T3D ), but from my end it seems to be a problem with the profile for GuiBitmapBorderCtrl.
If you do a search in the project for "GuiBitmapBorderProfile"; you'll see that there is none. Look up fellow GuiBitmapBorderCtrl's and piggyback off their profiles for now; it should solve your crash.