FHannes Posted April 20, 2012 Share Posted April 20, 2012 SortATPABySize only has a single parameter... Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted April 21, 2012 Share Posted April 21, 2012 (edited) SortATPABySize only has a single parameter...Unfortunately if you change the problem line in the script to a single parameter (ATPA) it still gives the incorrect number of parameters error. This is what I was referring to. Here is just that function dropped into an empty script. It compiles. That exact same function gives an "invalid # of parameters" when compiled as part of the full script. Note he is using SortATPASize (which takes 2 params) but you get the exact same effect with SortATPABySize (which takes 1 param). (Which I added to test and commented out) All of which suggests it is not a problem with the script or rather perhaps the script surfacing an obscure issue with SCAR. Regardless it is enough to drive you round the bend. I lost track of the number of times I bumped into this "feature" when trying to write version 2 of my superheater. Drove me absolutely crazy and I could never come up with a test script so I could file a bug report. Apologies Wanted if I shouldn't have quoted your script here. [sCAR]program New; {$DEFINE RS2} {$DEFINE OSI_Color_Anti_Randoms} //{$DEFINE SMART} // Comment out to disable SMART {$I OSI\OSI.scar} {$I OSI\Divi\Misc\Debug.scar} {=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= function TalkToAli: Boolean; Contributors: Wanted Description: Initiates conversation with Ali. Date Created: Feburuary 5th, 2012. By Wanted. RS2 Build 700. Last Modification: Feburuary 5th, 2012. By Wanted. RS2 Build 700. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=} function TalkToAli: Boolean; var ATPA: T2DPointArray; TPA: TPointArray; P: TPoint; begin Result := False; ColorToleranceSpeed(2); SetColorSpeed2Modifiers(0.09, 0.25); FindColorsTolerance(TPA, 9662030, MSX1, MSY1, MSX2, MSY2, 11); SetColorSpeed2Modifiers(0.2, 0.2); ColorToleranceSpeed(1); ATPA := SplitTPA(TPA, 8); if (Length(ATPA) < 1) then Exit; SortATPASize(ATPA, True); // This now compiles (does not in full script) // SortATPABySize(ATPA); // as does this (does not in full script) P := MiddleTPA(ATPA[0]); MMouse(P.X, P.Y, 0, 0); if (not (IsUpTextMulti(['to A', 'Ali', 'li M', 'orrisa', 'risane']))) then Exit; GetMousePos(P.X, P.Y); Mouse(P.X, P.Y, 0, 0, True); Result := True; end; procedure ScriptTerminate; begin FreeOSI; end; begin SetUpOSI; TalkToAli; end.[/sCAR] Edited April 21, 2012 by Bixby Sayz Quote Link to comment Share on other sites More sharing options...
FHannes Posted April 21, 2012 Share Posted April 21, 2012 Yeah, missed the By, not sure then... Quote Link to comment Share on other sites More sharing options...
Wanted Posted April 24, 2012 Author Share Posted April 24, 2012 When I compiled this is threw the error from here 452 : " if (not (EnterBankPin(Players[CurrentPlayer].Pin, True))) then" notice I added the True (see this thread http://forums.scar-divi.com/showthread.php?1212-IMPORTANT-Tab-Screen-Check-Restructure-UPDATE-YOUR-SCRIPTS-NOW-OSI-Dev-3-30-12&highlight= ) My SCAR compiles and maps the error correctly, however yours did not. Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted April 24, 2012 Share Posted April 24, 2012 That fixed it. It was line 618 for me using the .zip file posted on the start of this thread. So the actual error was on 618, but the compiler was reporting 647. Freddy you may want to look into this. Quote Link to comment Share on other sites More sharing options...
FHannes Posted April 24, 2012 Share Posted April 24, 2012 I'm aware that the preprocessor still has some issues with the mapping, but I haven't been able to track them down yet. Quote Link to comment Share on other sites More sharing options...
Wanted Posted April 25, 2012 Author Share Posted April 25, 2012 They've all been fixed for me since they were fixed last, which was shortly after the bug was introduced in the first place. I didn't think this issue was around any more at all. Quote Link to comment Share on other sites More sharing options...
FHannes Posted April 25, 2012 Share Posted April 25, 2012 They've all been fixed for me since they were fixed last, which was shortly after the bug was introduced in the first place. I didn't think this issue was around any more at all. Some of my tests for it are still failing, though the tests could be wrong obviously, I need to check... Quote Link to comment Share on other sites More sharing options...
Eksnab Posted May 14, 2012 Share Posted May 14, 2012 So is there a way to fix the error on line 647 .-. Quote Link to comment Share on other sites More sharing options...
danman Posted June 26, 2012 Share Posted June 26, 2012 yes is there a way to fix line 647 i read all of the post from page one to here and i see thet their is now a bug so grrrrr how do we fix it Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted June 26, 2012 Share Posted June 26, 2012 yes is there a way to fix line 647 i read all of the post from page one to here and i see thet their is now a bug so grrrrr how do we fix it I honestly dont know. We discussed it throughout this thread, but the problem was never located or fixed. The best idea i can give to you is to try to write your own scripts. If you need help we will be glad to help you learn to write scripts. ~ Shadowrecon Quote Link to comment Share on other sites More sharing options...
fadedrequiem Posted June 28, 2012 Share Posted June 28, 2012 you can fix the line 647 error pretty easily, go to line 618 where the code is if (not (EnterBankPin(Players[CurrentPlayer].Pin))) then change it to if (not (EnterBankPin(Players[CurrentPlayer].Pin, True))) then after that it works great, once you fix it not clicking the green arrows as well ( im not going to spoonfeed it all, its in the first few pages ) my only problem with it at the moment is there's hardly any profit at all, I actually lose money pretty often Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted June 28, 2012 Share Posted June 28, 2012 you can fix the line 647 error pretty easily, go to line 618 where the code is if (not (EnterBankPin(Players[CurrentPlayer].Pin))) then change it to if (not (EnterBankPin(Players[CurrentPlayer].Pin, True))) then after that it works great, once you fix it not clicking the green arrows as well ( im not going to spoonfeed it all, its in the first few pages ) my only problem with it at the moment is there's hardly any profit at all, I actually lose money pretty often Wow, the error is finally located! =p The problem is runes have dropped in price so much since the loadstone update =/ Quote Link to comment Share on other sites More sharing options...
fadedrequiem Posted June 28, 2012 Share Posted June 28, 2012 yeah I noticed the severe drop in rune prices, I did this with 4m exactally last night and ended up with 3.8m. what kind of crap is that I hope rune prices go up again, this could be super profitable! your all welcome for the spoonfeed on that one, the information to fix it is in this post but its super confusing and hard to find.. so I just simplified it lol Quote Link to comment Share on other sites More sharing options...
joneas123 Posted August 7, 2012 Share Posted August 7, 2012 When i try to run the script i get the error: Compile error line 130 Unknown identifier 'HoldMouse'. Any suggestions on how to fix this/what to do? Quote Link to comment Share on other sites More sharing options...
Janilabo Posted August 7, 2012 Share Posted August 7, 2012 When i try to run the script i get the error: Compile error line 130 Unknown identifier 'HoldMouse'. Any suggestions on how to fix this/what to do? This script is outdated.Also, with newest SCAR Divi (3.35) HoldMouse() is named as MouseBtnDown() and ReleaseMouse() is named as MouseBtnUp(). Changelog: http://svn.scar-divi.com/scar/changelog.txt Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted August 7, 2012 Share Posted August 7, 2012 (edited) This script needs a lot of updating to be compatible with 3.35. I don't know if any of the scripts have been updated yet. (I know I am guilty of not updating mine yet) For kicks had a go at updating this script to 3.35. Not a lot of joy. Into the "fun" of parser throwing an error on the wrong line and left guessing where the actual error is. fuuuuuuuun. Edit: I have it compiling with the latest SCAR and OSI includes. Haven't run it to see if it still does what it is supposed to. Have to check with Wanted before posting it. It is his script after all. Edited August 7, 2012 by Bixby Sayz Quote Link to comment Share on other sites More sharing options...
wyn10 Posted September 3, 2012 Share Posted September 3, 2012 This script needs a lot of updating to be compatible with 3.35. I don't know if any of the scripts have been updated yet. (I know I am guilty of not updating mine yet) For kicks had a go at updating this script to 3.35. Not a lot of joy. Into the "fun" of parser throwing an error on the wrong line and left guessing where the actual error is. fuuuuuuuun. Edit: I have it compiling with the latest SCAR and OSI includes. Haven't run it to see if it still does what it is supposed to. Have to check with Wanted before posting it. It is his script after all. Just make a pull request on the git, he would have to approve the edit. Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted September 3, 2012 Share Posted September 3, 2012 Lost my copy I had working so I redid it. Got it compiling, but the initialization is not finding the client window. Wondering if I missed something. I replaced this: [sCAR] {$IFNDEF SMART} FindWindowBySize(RSPW, RSPH); WaitRR(500, 750); ActivateClient; {$ENDIF} [/sCAR] with this: [sCAR] {$IFNDEF SMART} Windows := FindWindowsBySize(GetDeskTopWindow, RSPW, RSPH, False); if (Length(Windows) < 1) then TerminateScript; SetClient(TSCARWindowClient.Create(Windows[0])).Free; WaitRR(500, 750); GetClient.Activate; {$ENDIF} [/sCAR] Compiles fine but doesn't find the RS window. Quote Link to comment Share on other sites More sharing options...
FHannes Posted September 3, 2012 Share Posted September 3, 2012 Lost my copy I had working so I redid it. Got it compiling, but the initialization is not finding the client window. Wondering if I missed something. I replaced this: [sCAR] {$IFNDEF SMART} FindWindowBySize(RSPW, RSPH); WaitRR(500, 750); ActivateClient; {$ENDIF} [/sCAR] with this: [sCAR] {$IFNDEF SMART} Windows := FindWindowsBySize(GetDeskTopWindow, RSPW, RSPH, False); if (Length(Windows) < 1) then TerminateScript; SetClient(TSCARWindowClient.Create(Windows[0])).Free; WaitRR(500, 750); GetClient.Activate; {$ENDIF} [/sCAR] Compiles fine but doesn't find the RS window. In this case you have to set Recursive to True as the RS client window is located in the browser. The browser is a child window of the desktop, but the RS window is a child window of the browser, so it has to do a recursive search to find it. Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted September 3, 2012 Share Posted September 3, 2012 (edited) May just leave the check out and simply activate whatever the active client is. Easier. Just did a test script that simply finds all windows and displays their dimensions: none of them match the desired dimensions; not even the RS client window. Speaking of which how do you search for all windows regardless of title: pass in '' perhaps? Edit: Got it. Searching by window size fails to find it. Had to search for blank window title (to get all windows) and then iterated through until found one that matched the size: which turned out to be +50 pixels in the Y direction (my that sounds familiar). Script compiles, but I still don't have a char that could test this to see if it actually works. About to head out to a house party for a bit. Might do the required quest(s) when I get back so I can test it. Edited September 3, 2012 by Bixby Sayz Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted September 4, 2012 Share Posted September 4, 2012 This script has a number of issues with each person's dialog being slightly different depending on how much of restocking requests they have completed. CBF to work on it tonight. Quote Link to comment Share on other sites More sharing options...
LordJashin Posted September 4, 2012 Share Posted September 4, 2012 Just make a pull request on the git, he would have to approve the edit. I to am getting familiar with git. Am I getting this right on this pull or not? D: Put a fork in it!? Lols I couldn't resist https://github.com/OSI1/OSI1/pull/5 Quote Link to comment Share on other sites More sharing options...
FHannes Posted September 4, 2012 Share Posted September 4, 2012 I to am getting familiar with git. Am I getting this right on this pull or not? D: Put a fork in it!? Lols I couldn't resist https://github.com/OSI1/OSI1/pull/5 I've merged you request into OSI, and also Bixby's which I missed apparently. Was expecting an email or something I'll upload the changes to the main repository soon. Make you you pull the changes into your local clone, my video explains how to do it. Quote Link to comment Share on other sites More sharing options...
LordJashin Posted September 4, 2012 Share Posted September 4, 2012 I've merged you request into OSI, and also Bixby's which I missed apparently. Was expecting an email or something I'll upload the changes to the main repository soon. Make you you pull the changes into your local clone, my video explains how to do it. Lol alright...I think there is a github app for phones. Then just turn on notifications for it . I'll email you for now on. Yes I watched your video! It was amazing, that tutorial! RIP Pull 5 Quote Link to comment Share on other sites More sharing options...