crabmusket / t3d-bones

A truly skeletal starter/learning project for Torque 3D.
MIT License
13 stars 9 forks source link

Script compile bug in sys/audio.cs #6

Open capnlove opened 10 years ago

capnlove commented 10 years ago

When downloading a fresh release of the master branch, the script compilation fails on file audio.cs

https://github.com/eightyeight/t3d-bones/blob/master/sys/audio.cs#L381

Placing the line singleton SimSet( SFXPausedSet ); with the other singleton definitions at the top of the file fixes the issue.

Not submitted as a Pull request as this might point the way to another bug? i.e. singletons defined after functions breaks script compilation.

crabmusket commented 10 years ago

Interesting, I can't actually reproduce this issue. Can you pull from master again, and then post your console.log either here or on pastebin or something?

capnlove commented 10 years ago

It doesn't run, it simply won't compile the .cs, Launching the executable simply crashes. On Win7, using Cmake to compile T3D in x64

crabmusket commented 10 years ago

Ah, I'll try it with a x64 executable. EDIT: which engine branch are you compiling from? Development? EDIT: Okay, reproduced with latest development head CMake x64. Might be a little while till I get round to looking into this properly. Probable it's related to the TS changes that have gone into 3.7 so far.

capnlove commented 10 years ago

I've also tried T3D's 3.6.1 master branch with t3d-bones master branch as well, the game starts, but the console still spews out the following

//-------------------------- 11/4/2014 -- 01:40:27 -----
sys/audio.cs Line: 395 - syntax error
>>> Advanced script error report.  Line 395.
>>> Some error context, with ## on sides of error halt:
///                     string to pause sources on all channels.
/// @param %pauseSet    An optional SimSet which is filled with the paused 
///                     sources.  If not specified the global SfxSourceGroup 
///                     is used.
///
/// @deprecated
///
function sfxPause( %channels, %pauseSet )
{
## ##  // Did we get a set to populate?
   if ( !isObject( %pauseSet ) )
      %pauseSet = SFXPausedSet;

   %count = SFXSourceSet.getCount();
   for ( %i = 0; %i < %count; %i++ )
   {
      %source = SFXSourceSet.getObject( %i );

      %channel = sfxGroupToOldChannel( %source.getGroup() );
>>> Error report complete.
crabmusket commented 10 years ago

Hmmmm okay. I'll probably not get to this in the next two days due to work, but I'll see what I can find out!

JeffProgrammer commented 9 years ago

It's the last /// before function. The TS compilier doesn't like an empty comment with 3 "/"

...something I or james should probably fix :p

lukaspj commented 9 years ago

Also discussed here: https://github.com/GarageGames/Torque3D/issues/396

jamesu commented 9 years ago

This is a long-standing bug with the compiler. Basically "///" inserts a documentation block but the parser isn't parsing it correctly.

crabmusket commented 9 years ago

I thought that was only an issue on Linux!

JeffProgrammer commented 9 years ago

nope =)