Results 1 to 17 of 17

Thread: Pro_InitSocket

  1. #1
    Join Date
    Feb 2013
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    48 Post(s)

    Default Pro_InitSocket

    Hi everyone,

    I downloaded the latest Reflection update today but somehow I get an error message now:

    Error: Unknown declaration "Pro_InitSocket" at line 86

    I redownloaded AeroLib, Aerolib includes, Reflection, almost everything for OSRS but I can't resolve the problem. Any ideas?

  2. #2
    Join Date
    Dec 2007
    Posts
    289
    Mentioned
    4 Post(s)
    Quoted
    86 Post(s)

    Default

    Update your ProSocks plugin!

    Replace Prosocks.dll found in ./Simba/Plugins/ with the latest .dll found here: https://github.com/Brandon-T/ProSock...5/Prosocks.dll

  3. #3
    Join Date
    Feb 2013
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    48 Post(s)

    Default

    Quote Originally Posted by honeyhoney View Post
    Update your ProSocks plugin!

    Replace Prosocks.dll found in ./Simba/Plugins/ with the latest .dll found here: https://github.com/Brandon-T/ProSock...5/Prosocks.dll
    Nay, no results. Tried that few hours ago, tried it again now but nothing

  4. #4
    Join Date
    Dec 2007
    Posts
    289
    Mentioned
    4 Post(s)
    Quoted
    86 Post(s)

    Default

    Quote Originally Posted by Sh4d0wf0x View Post
    Nay, no results. Tried that few hours ago, tried it again now but nothing
    Ohh!!! My bad! Just re-read the error message.

    The script you're using is trying to call the "Pro_InitSocket" method. In the latest plugin (which you have updated to) this has been refactored to the "Init" method that applies to the SSLSocket type.

    You'll have to update your script to comply with the latest ProSocks plugin - if you share it we might be able to help out

  5. #5
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    Quote Originally Posted by honeyhoney View Post
    Ohh!!! My bad! Just re-read the error message.

    The script you're using is trying to call the "Pro_InitSocket" method. In the latest plugin (which you have updated to) this has been refactored to the "Init" method that applies to the SSLSocket type.

    You'll have to update your script to comply with the latest ProSocks plugin - if you share it we might be able to help out
    Explain how one would "your script to comply with the latest ProSocks plugin" because prosocks is called through
    Code:
    {$DEFINE SMART}
    {$i AeroLib/AeroLib.Simba}
    {$i Reflection/Reflection.Simba}
    Now i know there were clashes between libraries. Try remove one of the includes see what happens? I know when i updated my prosocks for Ezform, i ran into the exact same problem.

    <------------------>



  6. #6
    Join Date
    Dec 2007
    Posts
    289
    Mentioned
    4 Post(s)
    Quoted
    86 Post(s)

    Default

    Quote Originally Posted by AFools View Post
    Explain how one would "your script to comply with the latest ProSocks plugin" because prosocks is called through
    Code:
    {$DEFINE SMART}
    {$i AeroLib/AeroLib.Simba}
    {$i Reflection/Reflection.Simba}
    Now i know there were clashes between libraries. Try remove one of the includes see what happens? I know when i updated my prosocks for Ezform, i ran into the exact same problem.
    When you get the error message it should take you to the line where ProSocks is being used. Possibly in the function TReflectionMisc.GetPage().

    Essentially wherever you see the Pro_InitSocket method, you need to replace it with the new Init method.

  7. #7
    Join Date
    Feb 2013
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    48 Post(s)

    Default

    It's in the misc file of the reflection include:


    {$IFNDEF Aerolib}
    {$include reflection/lib/misc/prosocks.simba}
    {$ENDIF}

    Function TReflectionMisc.GetPage(Url: string): string;
    var
    S: SSLSocket;
    Res: ProMemoryStruct;
    begin
    Pro_InitSocket(S, nil, nil, nil, nil);
    Pro_CreateSocket(S, '');
    Pro_SetSSL(S, false, false, true);
    Pro_SetURL(S, URL);
    Pro_DoGetEx(S, Res);
    SetLength(Result, Res.size);
    MemMove(Res.Memory^, Result[1], Res.Size);
    Pro_FreeSocket(S);
    end;

  8. #8
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    Quote Originally Posted by honeyhoney View Post
    When you get the error message it should take you to the line where ProSocks is being used. Possibly in the function TReflectionMisc.GetPage().

    Essentially wherever you see the Pro_InitSocket method, you need to replace it with the new Init method.
    Correct; there is a thread for correct this somewhere. You are correct. =D

    It been a living nightmare getting simba to work on somebody else computer. For mine i have just taken a back up of my C:/ Simba/files. So i simply install simba, delete the simba file and drag and drop. =D

    <------------------>



  9. #9
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    ************* Edit Not Needed; Solution Below

    <------------------>



  10. #10
    Join Date
    Dec 2007
    Posts
    289
    Mentioned
    4 Post(s)
    Quoted
    86 Post(s)

    Default

    Quote Originally Posted by Sh4d0wf0x View Post
    It's in the misc file of the reflection include:


    {$IFNDEF Aerolib}
    {$include reflection/lib/misc/prosocks.simba}
    {$ENDIF}

    Function TReflectionMisc.GetPage(Url: string): string;
    var
    S: SSLSocket;
    Res: ProMemoryStruct;
    begin
    Pro_InitSocket(S, nil, nil, nil, nil);
    Pro_CreateSocket(S, '');
    Pro_SetSSL(S, false, false, true);
    Pro_SetURL(S, URL);
    Pro_DoGetEx(S, Res);
    SetLength(Result, Res.size);
    MemMove(Res.Memory^, Result[1], Res.Size);
    Pro_FreeSocket(S);
    end;
    Replace that method with:

    Code:
    Function TReflectionMisc.GetPage(Url: string): string;
    var
      S: SSLSocket;
      Res: ProMemoryStruct;
    begin
      S.init();
      S.setURLFollow(true);
      S.setURL(URL);
      S.doGet(Res);
      SetLength(Result, Res.size);
      MemMove(Res.Memory^, Result[1], Res.Size);
      S.free;
    end;
    Source: https://villavu.com/forum/showthread.php?t=115356

  11. #11
    Join Date
    Feb 2013
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    48 Post(s)

    Default

    Quote Originally Posted by honeyhoney View Post
    Replace that method with:

    Code:
    Function TReflectionMisc.GetPage(Url: string): string;
    var
      S: SSLSocket;
      Res: ProMemoryStruct;
    begin
      S.init();
      S.setURLFollow(true);
      S.setURL(URL);
      S.doGet(Res);
      SetLength(Result, Res.size);
      MemMove(Res.Memory^, Result[1], Res.Size);
      S.free;
    end;
    Source: https://villavu.com/forum/showthread.php?t=115356
    Hero!

    Thank you everone!

  12. #12
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    I'll update the include to that version of ProSocks in a bit, once I push the new antiban methods.. I really hope that stops people from using Aerolib with reflection, as it is completely unnecessary and I always get stuck with fixing the compatibility issues..

    EDIT: Done, do note that you now must have the latest version of Prosocks found here..
    Last edited by Kyle; 01-08-2016 at 03:01 PM.
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  13. #13
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by Kyle View Post
    I'll update the include to that version of ProSocks in a bit, once I push the new antiban methods.. I really hope that stops people from using Aerolib with reflection, as it is completely unnecessary and I always get stuck with fixing the compatibility issues..

    EDIT: Done, do note that you now must have the latest version of Prosocks found here..
    The compile issues were due to users having the newest ProSocks plugin and the Reflection include only compatible outdated version. With or without AeroLib, people using the up-to-date plugin would have issues. This is all part of maintaining a library...

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  14. #14
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    The compile issues were due to users having the newest ProSocks plugin and the Reflection include only compatible outdated version. With or without AeroLib, people using the up-to-date plugin would have issues. This is all part of maintaining a library...
    Yes, I wasn't speaking to the compatibility as it pertains to prosocks, as that would get changed one way or another. I was more so speaking of all the naming conventions and IfDef/IfnDef's that I have throughout the include that keep it compatible, which inevitable must be changed each time AL gets updated. That is why I really hope we can stop scripter's from using both and just AL only or Reflection only. It gets annoying not only having to keep my updater updated and the include updated, but also to have to worry about the next time I will have to fix a compatibility issue with AL.

    I'll try and learn how to maintain a library properly I suppose? Iunno..
    Last edited by Kyle; 01-09-2016 at 04:03 PM.
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  15. #15
    Join Date
    Oct 2006
    Posts
    313
    Mentioned
    0 Post(s)
    Quoted
    13 Post(s)

    Default

    Keep getting this error after updating plugin and treflectionmisc


    Error: Unknown declaration "Pro_InitSocket" at line 623

  16. #16
    Join Date
    Dec 2007
    Posts
    289
    Mentioned
    4 Post(s)
    Quoted
    86 Post(s)

    Default

    Quote Originally Posted by sk80rdie76 View Post
    Keep getting this error after updating plugin and treflectionmisc


    Error: Unknown declaration "Pro_InitSocket" at line 623
    You're using AeroLib as well. You'll need to update that so it also uses the latest version of ProSocks.

  17. #17
    Join Date
    Jan 2012
    Posts
    468
    Mentioned
    3 Post(s)
    Quoted
    200 Post(s)

    Default

    I have updated the aerolib plug in as well as ProSocks and still nothing but error at line 623

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •