|
#1
|
|||
|
|||
|
<name> expected near `return'
Good Day
I am having a problem in compiling my Update Scripts with True Update 3.0. Upon verifying (check syntax) the on finish script for a screen in the updater I get the following error message: Line=x <name> expected near `return' this is line x Code:
Screen.return(SR_SUCCESS); Thanks for your time. |
|
#2
|
||||
|
||||
|
Not sure exactly what the issue is but the syntax for that action should be:
Code:
Screen.Return(SR_SUCCESS); |
|
#3
|
|||
|
|||
|
When I change the r to R as soon as the cursor moves away it reverts to lowercase "r". I thought that perhaps I couldn't write to the file, but I do have write access. Any other ideas?
I solved my problem by manually editing the .tu2 file, replacing "Screen.return" with "Screen.Return". But given that the editor reverts the case the script editor may be at fault. Is it not possible that return being a reserved word, is being misidentified in the case of Screen.return by the syntax checker? Last edited by ryanc; 11-22-2007 at 02:46 AM. Reason: I forgot to add how I Fixed it - and my theory |
|
#4
|
||||
|
||||
|
I have run some tests here on my XP-SP2 machine and cannot replicate this issue. I am able to type in Screen.Return and it honors the capital R.
Adam Kapilik |
|
#5
|
|||
|
|||
|
Still Happening
The problem isn't with new additions, it is when editing an already existing script. The project I am using I have been using since I first implemented TU (about a year ago now).
In terms of replication it's really easy, I create a new project. Go the HTTP Download Screens On Finish Event and there it is "Screen.return" --------------------------------------------- To Test What I did was open the project in Notepad++ to check all the caps of Screen.Return, which was all 100%. And at each stage of the editing the file I reloaded the file to check that it had remained in the correct case. So far so good. However when getting to the script editor, the script editor had already changed Return to return. The file on the HD was still correct. At this point I had not saved the file to the HD. I then try to a compile and I get the error, I imagine its using the in memory version of my script which has been modified by the syntax editor. So I am still having this problem, needless to say it is Extremely annoying. I have double checked the write permissions to the file the only "odd" thing about my setup is that I do all my Dev on a Subst Drive, which I imagine plenty other people do. Can I submit my project to the support department to be checked out? Any other suggestions? My Setup: OS Name Microsoft Windows XP Professional Version 5.1.2600 Service Pack 2 Build 2600 OS Manufacturer Microsoft Corporation System Manufacturer INTEL_ System Model D865GLC_ System Type X86-based PC Processor x86 Family 15 Model 3 Stepping 4 GenuineIntel ~3192 Mhz Processor x86 Family 15 Model 3 Stepping 4 GenuineIntel ~3192 Mhz BIOS Version/Date Intel Corp. BF86510A.86A.0063.P18.0406220349, 2004/06/22 SMBIOS Version 2.3 Windows Directory C:\WINDOWS System Directory C:\WINDOWS\system32 Boot Device \Device\HarddiskVolume1 Locale South Africa Hardware Abstraction Layer Version = "5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)" Time Zone South Africa Standard Time Total Physical Memory 1,024.00 MB Available Physical Memory 327.79 MB Total Virtual Memory 2.00 GB Available Virtual Memory 1.96 GB Page File Space 1.63 GB Page File C:\pagefile.sys True Update: Version 2.0.6.0 Last edited by ryanc; 12-03-2007 at 02:36 AM. |
|
#6
|
||||
|
||||
|
Hi Raync,
In your first post you said that you were using TrueUpdate 3.0 but given your last post I assume that you are using TrueUpdate 2.0 is this correct? Now as far as the code is concerned you mean the code on the "On Finish" event of the "Download File (HTTP)" screen? The code is the following correct? Code:
if(screen_globals.DownloadResult == 0) then -- Return SR_SUCCESS so the calling script knows that -- the file was downloaded successfully Screen.Return(SR_SUCCESS); else Have you tried saving your project file using another name? Or to another drive?
__________________
MSI Factory The Next Generation Intelligent Setup Builder |
|
#7
|
|||
|
|||
|
ah yes
Correct I am using True Update 2.0 my mistake.
I will try your suggestions [edit] As for saving to another file name, experience has taught me that for each change save to a new file name. So for each change I make to my True Update project I save to a new filename. [edit 2] Yes the screen in question is the download http screen. The code editor isn't reverting Screen.Return (in the main screen). It still honors it in the main screen editor (Client/Server Scripts) [edit 3] As I load the screen for editing "Download File (HTTP) -> On Finish editor display it already as Screen.return and typing it (Screen.Return) in the editor reverts it to Screen.return So there we have it Last edited by ryanc; 12-06-2007 at 07:49 AM. |
|
#8
|
||||
|
||||
|
Hi ryanc,
Please try to answer these questions as best you can: 1) When you say revert, do you mean that the character changes after you type it? Are you trying the full action each time? 2) Did you try pasting: Code:
Screen.Return(SR_SUCCESS); 3) What happens when you try typing Screen.Return(SR_SUCCESS); on another event of the "Download File (HTTP)" screen? Does it work properly there? 4) What about on a different screen? Have you tried that does it work properly there? 5) What happens if you add another "Download File (HTTP)" screen, and then type Screen.Return(SR_SUCCESS);? 6) Have you tried uninstalling the software and reinstalling it? This is a very strange error that has never been reported to us, and cannot be replicated by any of our testers. 7) Do you have any screen capture software? Would it be possible for you to create a video of the revert happening so that we can see exactly what is happening?
__________________
MSI Factory The Next Generation Intelligent Setup Builder |
|
#9
|
|||
|
|||
|
Video
I have recorded my testings in a flash video.
It makes it pretty clear as to what my problem is. |
|
#10
|
||||
|
||||
|
Hi ryanc,
Thanks for the video, it really cleared things up for us on this end. What gave it away was the fact that "Return" was being coloured blue, meaning that it was being parsed as a keyword. This is actually an editor setting, right-click on the script and select "Editor Settings". Then on the Language tab of the Editor Settings dialog you should see a checkbox that is checked near the bottom labeled "Fixup text case when typing language keywords." uncheck that checkbox and everything should work properly again.
__________________
MSI Factory The Next Generation Intelligent Setup Builder |
|
#11
|
|||
|
|||
|
Thanks
Just tested it with the changed setting and it no longer occurs. But will I not be loosing some functionality with this setting changed?
|
|
#12
|
||||
|
||||
|
Hi ryanc,
You may be losing some functionality with that setting turned off. However it is turned off by default and it obviously is incompatible with the screen.Return() action since return is a keyword.
__________________
MSI Factory The Next Generation Intelligent Setup Builder |
|
#13
|
|||
|
|||
|
An Error?
Is this not possibly a bug then? I haven't noticed anything different as yet, but then I haven't had to do any major work in the project of recent
|
|
#14
|
||||
|
||||
|
Hi ryanc,
No this is not a bug, everything is working properly. The "Fixup text case when typing language keywords." checkbox does exactly what it says that it does. It ensures that the case of any keyword that it encounters is correct. So with that option enabled, if "Return" is encountered the editor will notice that it is a keyword with the incorrect case an adjust it to be: "return". This is the correct functionality. However this is incompatible with the Screen.Return() action since the action's name contains a keyword.
__________________
MSI Factory The Next Generation Intelligent Setup Builder |
|
#15
|
|||
|
|||
|
It's a feature that causes problems as it doesn't respect the Internal TU functions, if I understand you correctly?
Perhaps some sort of visual warning about enabling this option, if it renders TU unable to compile your in screen scripts? |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CompareFileVersions does not work as expected | tkilshaw | Setup Factory 7.0 Discussion | 2 | 05-18-2005 11:15 AM |
All times are GMT -6. The time now is 02:59 AM.








Linear Mode

