forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Hit the problem again

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
nemisis010
Newbie


Joined: 29 May 2002
Posts: 17
Location: Australia

PostPosted: Thu May 30, 2002 11:02 am    Post subject: Hit the problem again Reply with quote

Tried to integrate that code into the main source and it keeps missing labels.

Title CFW DB Manager
DIALOG CREATE,Conquest Frontier Wars DB Manager,-1,0,450,349
DIALOG ADD,MENU,File,&Start,&Delete,&Exit
DIALOG ADD,MENU,Help,&Contents,&About
DIALOG ADD,LIST,FILELIST,24,8,432,96,Click
DIALOG ADD,LIST,BFILELIST,152,8,432,96,Click
DIALOG ADD,BUTTON,Exit,296,192,64,24,Exit
DIALOG ADD,STATUS,STATUS1,Ready
DIALOG ADD,PROGRESS,PROGRESS1,264,24,400,16
DIALOG ADD,TEXT,TEXT1,8,8,,,Select the file that you want backed up
DIALOG ADD,TEXT,TEXT2,136,8,,,Select a file to restore the files
DIALOG SHOW

%F = *.db

%D = @datetime(dd-mm-yy,%T)
%S = @regread(LOCAL,Software\Fever Pitch\Conquest: Frontier Wars\1.00,EXE Path)
%U = @regread(LOCAL,Software\Microsoft\DirectPlay\Applications\Conquest Frontier Wars,Path)


:CONT1
if @EQUAL(%S,%U)
%%CFWPATH = @regread(LOCAL,Software\Fever Pitch\Conquest: Frontier Wars\1.00,EXE Path)
else
goto CONT2
end

:CONT2

DIRECTORY CREATE, %%CFWPATH\Dbackup
DIRECTORY CHANGE, %%CFWPATH
DIALOG SET,STATUS1,Searching"," Please Wait...
RUNH command /c dir /B *.db > c:\List1.dat, WAIT
LIST LOADFILE,FILELIST,c:\List1.dat
DIALOG SET,STATUS1,Search Finished.

:CONT3
DIRECTORY CHANGE, %%CFWPATH\Dbackup
DIALOG SET,STATUS1,Searching"," Please Wait...
RUNH command /c dir /B /ad > c:\List2.dat, WAIT
LIST LOADFILE,BFILELIST,c:\List2.dat
DIALOG SET,STATUS1,Search Finished.

rem %Z = @msgbox(This is only a Beta Release,Beta Release,$000)
:Evloop
wait event
parse "%E;%D', @event(d)
goto %E

:FilelistCLICK
dialog set,status1,File Selected: @dlgtext(FILELIST)
IF @EQUAL(@msgbox(Are you sure you want to backup @dlgtext(FILELIST),Backup,$024),7)
ELSE
info backup function here
goto evloop
END
goto evloop

:BfilelistCLICK
dialog set,status1,Backup File Selected: @dlgtext(BFILELIST)
IF @EQUAL(@msgbox(Are you sure you want to restore @dlgtext(BFILELIST),Backup,$024),7)
ELSE
info restore function here
goto evloop
END
goto evloop

:ExitMENU
goto Close

:ContentsMENU
info Replace this line with code to process the ContentsMENU event
goto evloop

:AboutMENU
DIALOG CREATE,About CFW Manager,-1,0,290,193
DIALOG ADD,BUTTON,OK,160,112,64,24,OK
DIALOG ADD,GROUP,GROUP1,8,8,272,144
DIALOG ADD,TEXT,TEXT1,24,24,,,CFW Database File Manager
DIALOG ADD,TEXT,TEXT2,48,24,,,Version 1.0
DIALOG ADD,TEXT,TEXT3,72,24,,,Created by Nemisis010
DIALOG ADD,TEXT,TEXT4,96,24,,,For support please contact me at
DIALOG ADD,TEXT,TEXT5,120,96,,,nemisis010"@"somewhere.com
DIALOG SHOW
goto evloop

:ExitBUTTON
goto Close


:ERROR1
%R = @msgbox(This program file has to be in the CFW home directory@cr()%%CFWPATH,Error!,$010)
goto evloop

:Close
if @greater(%D, 0)
DIALOG SELECT, %D
DIALOG CLOSE
%E = @event()
goto evloop
End
exit

_________________
------------------------------------


Boo
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu May 30, 2002 11:11 am    Post subject: Reply with quote

_____________________________________________________________
Which labels does it miss?
BTW, I don't see an OKBUTTON label in your code...

You can add this line:

INFO label = %e

as shown here to test it.

Code:

:EVLOOP
  WAIT EVENT
  PARSE "%e;%d", @event(d)
  INFO label = %e
  goto %e


Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361


Last edited by Mac on Thu May 30, 2002 12:21 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu May 30, 2002 11:16 am    Post subject: Reply with quote

You can also stack your OKBUTTON and ExitMENU
labels above the CLOSE label to save some code.

Code:

:OKBUTTON
:ExitMENU
:CLOSE
  if @greater(%d, 0)
    DIALOG SELECT, %d
    DIALOG CLOSE
    rem -- Kill any extra events --
    %e = @event()
    goto EVLOOP
  end
  EXIT


Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
nemisis010
Newbie


Joined: 29 May 2002
Posts: 17
Location: Australia

PostPosted: Thu May 30, 2002 11:45 am    Post subject: Tried Reply with quote

It seems to be spitting this error at me now;

"Missing parameters to the command" as soon as i select the About menu item.


i also tried to put the;

info test %E

but the %e variable was blank

_________________
------------------------------------


Boo


Last edited by nemisis010 on Thu May 30, 2002 11:55 am; edited 1 time in total
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu May 30, 2002 11:52 am    Post subject: Reply with quote

Does it show a line number for the error?
_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu May 30, 2002 11:54 am    Post subject: Reply with quote

Here's the error:

parse "%E;%D', @event(d)

it should be:

PARSE "%e;%d", @event(d)

You missed a quote mark...

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
nemisis010
Newbie


Joined: 29 May 2002
Posts: 17
Location: Australia

PostPosted: Thu May 30, 2002 11:59 am    Post subject: perfect Reply with quote

Dam, it's funny how that can happen, and it's bloody anoying, but thanks mate. Very Happy
_________________
------------------------------------


Boo
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu May 30, 2002 12:09 pm    Post subject: Reply with quote

Glad to help, typos can drive ya nuts sometimes. Wink

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group