PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: 'STRANGE' CODEGEN DECLARES PROBLEM  (Read 494 times)

Stephen Pardoe

  • Little Newbie
  • *
  • Posts: 12
  • FF3 User
'STRANGE' CODEGEN DECLARES PROBLEM
« on: October 03, 2011, 01:29:27 AM »

Hi,

I have a problem when compiling my latest project - the compiler is returning an error on the Declares file 'CODEGEN_PROJECT1_DECLARES'. The error number is Error 426: Variable Expected.

There is a line in the declares file that reads 'Declare Sub End'. Below is the portion including this line:

Declare Sub FF_TrackBar_SetPos (BYVAL hTrackbar AS DWORD, BYVAL fPosition AS LONG, BYVAL lPosition AS LONG)

Declare Sub FF_TrackBar_SetRangeMax (BYVAL hTrackbar AS DWORD, BYVAL fRedraw AS LONG, BYVAL lMaximum AS LONG)
Declare Sub End
Declare Sub FF_TrackBar_SetRangeMin (BYVAL hTrackbar AS DWORD, BYVAL fRedraw AS LONG, BYVAL lMinimum AS LONG)
 
Now the weird thing is I only made some superficial changes to the code (and indeed went back over these and commented them out) but no joy. Went through the declares file and ensured that all of my user subs have been declared and they have.

Would appreciate a rabbit out of the hat on this one as nagturally I cannot compile..

BTW if it turns out that I have done something stupid then I apologise in advance !

Steve Pardoe.
Logged

Stephen Pardoe

  • Little Newbie
  • *
  • Posts: 12
  • FF3 User
Re: 'STRANGE' CODEGEN DECLARES PROBLEM
« Reply #1 on: October 03, 2011, 03:22:24 AM »

After many hours of frustration - the 'cause' was :

FF_TrackBar_SetRangeMax function

With this commented out, all works (apart from the fact that the function to set the max value produces strange code and therefore seems unusable).

Anyone got any ideas about this at all ? Seems like it is an intrinsic FF thing on the face of it...

Regards,

Steve.
Logged

Josť Roca

  • Guru Member
  • *****
  • Posts: 3170
Re: 'STRANGE' CODEGEN DECLARES PROBLEM
« Reply #2 on: October 03, 2011, 09:48:23 AM »

Change the last line of the FF_TrackBar_SetRangeMax procedure from SUB END to END SUB.

Code: [Select]
Sub FF_TrackBar_SetRangeMax (BYVAL hTrackbar AS DWORD, BYVAL fRedraw AS LONG, BYVAL lMaximum AS LONG)

    SendMessage hTrackbar, %TBM_SETRANGEMAX, fRedraw, lMaximum

Sub End

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8762
  • Windows 10
    • PlanetSquires Software
Re: 'STRANGE' CODEGEN DECLARES PROBLEM
« Reply #3 on: October 03, 2011, 10:46:55 AM »

Thanks Jose,

I caught that error some time ago. It is changed in my version of the FF Library. I guess that there are still older versions floating around.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Stephen Pardoe

  • Little Newbie
  • *
  • Posts: 12
  • FF3 User
Re: 'STRANGE' CODEGEN DECLARES PROBLEM
« Reply #4 on: October 04, 2011, 12:11:04 AM »

Thanks Jose,

In retrospect I guessed I should've checked more closely. I thought I had the most recent edition of FF. Obviously not.

On a separate note Jose, your site is no longer accepting new registrations it seems. Is this correct ?

Thanks in advance,

Steve.
Logged

Josť Roca

  • Guru Member
  • *****
  • Posts: 3170
Re: 'STRANGE' CODEGEN DECLARES PROBLEM
« Reply #5 on: October 04, 2011, 12:44:18 AM »

Quote
On a separate note Jose, your site is no longer accepting new registrations it seems. Is this correct ?

Self registration was disabled because of excesive spam and registration of people using pirated copies of the compiler. One thing is to deal with a dozen of spammers daily and another with more than 3,000 in less than two days. I had to spend all day just deleting fake registrations.

If you want to register, just send me a personal message with a valid email and I will register you manually.

Stephen Pardoe

  • Little Newbie
  • *
  • Posts: 12
  • FF3 User
Re: 'STRANGE' CODEGEN DECLARES PROBLEM
« Reply #6 on: October 04, 2011, 05:50:55 AM »

Thanks Jose, sent you a personal message earlier.  :D
Logged