Snap Posted May 16, 2010 Report Share Posted May 16, 2010 Hello,I wanted to test the game so I grabed it from playdeb.net. I can run the game, choose "Single player" and click on "Start the game" but the screen is blocked when the progress bar is full.I started the game from a terminal and I got this:gui/loading/loading.js(38): ReferenceError: curr_music is not definedERROR: JavaScript Error (gui/loading/loading.js, line 38): ReferenceError: curr_music is not definedGAME STARTED, ALL INIT COMPLETETo fix it, edit as root the file /usr/lib/games/0ad/data/mods/public/gui/loading/loading.jssudo gedit /usr/lib/games/0ad/data/mods/public/gui/loading/loading.jsAnd replace at line 38if (curr_music)withif (typeof(curr_music) != "undefined").And then it works !Hope this helps Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted May 16, 2010 Report Share Posted May 16, 2010 Is this the 0.0.0+r07539~pre-alpha-1~getdeb1 package from PlayDeb? I don't understand why you get this problem when it appears to work fine for me and (as far as I'm aware) for most other people . Implicit global variables are yucky but it shouldn't fail randomly - functions_page_pregame.js sets curr_music which I think should make it available to other GUI scripts. Do you have other problems with music/sounds not playing, which might make this work differently? (I could apply this fix to the code in SVN but I'd prefer to understand the problem first.) Quote Link to comment Share on other sites More sharing options...
Snap Posted May 17, 2010 Author Report Share Posted May 17, 2010 Yes, this is exactly this package. I don't understand. I have no sound until game is started.Here is the complete log taken from terminal:TIMER| InitVfs: 138.402 msTIMER| InitScripting: 1.62933 msWARNING: Cannot find config file "config/local.cfg" - ignoringWARNING: Cannot find config file "config/profiles/default/settings/user.cfg" - ignoringTIMER| CONFIG_Init: 3.30224 msTIMER| write_sys_info: 10.7451 msPerformance warning: your graphics card does not support compressed textures. The game will try to continue anyway, but may be slower than expected. Please try updating your graphics drivers; if that doesn't help, please try upgrading your hardware.TIMER| ps_console: 57.6031 msTIMER| ps_lang_hotkeys: 12.757 msTIMER| common/setup.xml: 30.3514 msTIMER| common/styles.xml: 11.1856 msTIMER| common/sprite1.xml: 12.2127 msTIMER| common/init.xml: 27.0557 msTIMER| pregame/sprites.xml: 9.59941 msTIMER| pregame/styles.xml: 535.823 usTIMER| pregame/mainmenu.xml: 96.1979 msTIMER| common/global.xml: 1.31029 msTIMER| common/setup.xml: 734.939 usTIMER| common/styles.xml: 377.422 usTIMER| common/sprite1.xml: 3.82332 msTIMER| msgbox/msgbox.xml: 35.4165 msTIMER| InitRenderer: 61.1974 msTIMER| common/setup.xml: 1.24457 msTIMER| common/styles.xml: 651.13 usTIMER| common/sprite1.xml: 4.62999 msTIMER| common/init.xml: 15.5602 msTIMER| loading/loading.xml: 13.9002 msTIMER| common/global.xml: 684.025 usgui/loading/loading.js(38): ReferenceError: curr_music is not definedERROR: JavaScript Error (gui/loading/loading.js, line 38): ReferenceError: curr_music is not definedGAME STARTED, ALL INIT COMPLETEI'm not a JavaScript expert, but you seem to be right. As long as you do not write "var" before curr_music, it is global and should be accessible from everywhere. Could it be possible for the file functions_page_pregame.js to be loaded/parsed *after* loading.js ? What JavaScript engine do you use ?Good luck, if you find the solution I'm curious to know it ! Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted May 28, 2010 Report Share Posted May 28, 2010 What JavaScript engine do you use ?SpiderMonkey (as used in Firefox etc). I committed a fix in r7550 a while ago since I encountered a similar problem when making the game launch directly into the loading screen skipping the menu - I don't think that's the same problem (so I don't know what the original problem was) but it's the same solution so hopefully it'll work okay. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.