GUI Doesn't Work After I Edit Script
by none · in Torque 3D Professional · 07/06/2012 (9:20 pm) · 6 replies
Hi! I'm trying to add music to my GUI and keep in mind it works perfectly before I do anything. I follow this tutorial http://www.garagegames.com/community/forums/viewthread/130811 and after it says "This GUI was created in a previous version and cannot be opened." This happens no matter what change I make to the .gui file and I can't make this sound file play through the GUI editor so I'm really stuck.
#2
i cannot reproduce that error .
sorry.i forgot what was actual issue.
if u can then post your 1st portion of that *.gui file.
[edit]
try to see if there is any error into the script by exeing in console.
07/06/2012 (10:05 pm)
strange!i cannot reproduce that error .
sorry.i forgot what was actual issue.
if u can then post your 1st portion of that *.gui file.
[edit]
try to see if there is any error into the script by exeing in console.
#3
I would try that but the issue is that the engine won't even allow me to run the GUI after I edit it outside of the GUI editor..
07/06/2012 (11:01 pm)
%guiContent = new GuiControl(CreateCharacter) {
position = "0 0";
extent = "1280 720";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "1";I would try that but the issue is that the engine won't even allow me to run the GUI after I edit it outside of the GUI editor..
#4
i am sure problem is for external editing.
michael,always aware new user about it.
where did u put scripts from
http://www.garagegames.com/community/forums/viewthread/130811 ?
use a separate file for those script.just exec that file before exeinng gui file.
i am sure that will solve your issue.
when everything ok only then merge both file.i used this strategy at my beginning days.
07/07/2012 (12:11 am)
Quote:do not put anything in that file.only edit it from gui editor.
after I edit it outside of the GUI editor..
i am sure problem is for external editing.
michael,always aware new user about it.
where did u put scripts from
http://www.garagegames.com/community/forums/viewthread/130811 ?
use a separate file for those script.just exec that file before exeinng gui file.
i am sure that will solve your issue.
when everything ok only then merge both file.i used this strategy at my beginning days.
#5
Steve's resource will work fine, but make sure that you add the code in the .gui file at the very end - after the closing brace at the end of the block:
Notice that the system (GUI editor in this case) puts those nice comments to tell you that it's done writing an object? Stay out of that part unless you know what the gui objects and their fields are and how to use them.
07/07/2012 (6:47 am)
Make sure there is no code inside the GUI object definition - in other words, do not add anything in that file unless you place it after the closing brace in that file. It is better to keep your script code and GUI definitions separate because things like this cause confusion.Steve's resource will work fine, but make sure that you add the code in the .gui file at the very end - after the closing brace at the end of the block:
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
// --- gui code deleted for brevity
};
//--- OBJECT WRITE END ---Notice that the system (GUI editor in this case) puts those nice comments to tell you that it's done writing an object? Stay out of that part unless you know what the gui objects and their fields are and how to use them.
#6
07/07/2012 (12:20 pm)
Aha this made it work! Thank you I was unaware that this was a problem! Thank you very much!
Ahsan Muzaheed
Default Studio Name
//--- OBJECT WRITE BEGIN --- %guiContent = new GameTSCtrl(XXXX) {