UPnPPortMapper

Started by ysc3839, Mar 28, 2015, 03:28 PM

Previous topic - Next topic

ysc3839

Don't need any configuration. Just add UPnPPortMapper in server.cfg! :)
https://bitbucket.org/ysc3839/0.4-upnpportmapper/downloads

DizzasTeR

Mind giving some information on this one?

MacTavish

It crash Server With An Error Here is the screenshot

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

.

#3
The error happens somewhere around here:
hr = spmc->Add(Port, L"UDP", Port, IPW, true, L"VCMP", &spm);
According to the MS documentation on this function:
HRESULT Add(
  [in]   long lExternalPort,
  [in]   BSTR bstrProtocol,
  [in]   long lInternalPort,
  [in]   BSTR bstrInternalClient,
  [in]   VARIANT_BOOL bEnabled,
  [in]   BSTR bstrDescription,
  [out]  IStaticPortMapping **ppSPM
);

Found out that the following:
Quote from: MicrosoftThe following code is incorrect:

BSTR MyBstr = L"I am a happy BSTR";

Which means that some of those arguments aren't what they're supposed to be. And that you should use SysAllocString and SysFreeString. Anyway, I'm not that much of a fan when it comes to MS, VS and Windows in general. So, it's out of my area.
.

ysc3839

#4
Quote from: S.L.C on Mar 28, 2015, 06:02 PMThe error happens somewhere around here:
hr = spmc->Add(Port, L"UDP", Port, IPW, true, L"VCMP", &spm);
According to the MS documentation on this function:
HRESULT Add(
  [in]   long lExternalPort,
  [in]   BSTR bstrProtocol,
  [in]   long lInternalPort,
  [in]   BSTR bstrInternalClient,
  [in]   VARIANT_BOOL bEnabled,
  [in]   BSTR bstrDescription,
  [out]  IStaticPortMapping **ppSPM
);

Found out that the following:
Quote from: MicrosoftThe following code is incorrect:

BSTR MyBstr = L"I am a happy BSTR";

Which means that some of those arguments aren't what they're supposed to be. And that you should use SysAllocString and SysFreeString. Anyway, I'm not that much of a fan when it comes to MS, VS and Windows in general. So, it's out of my area.
I want to know why it works well on my PC?

Fixed!

ysc3839

Quote from: Beztone on Mar 28, 2015, 05:25 PMIt crash Server With An Error Here is the screenshot

Fixed. Please download again! :)

MacTavish

It works on My friends computer Doesn't worked for me maybe cause on my modem and it bugged register command after removing the plugin everything works fine

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

rObInX

I used x64 and it crashes my server.


DizzasTeR

The x64 version is crashing the server, any help?

ysc3839

#10
Quote from: Doom_Killer on Apr 18, 2015, 03:04 PMThe x64 version is crashing the server, any help?
I tested it, but no any wrong. Maybe you haven't turn on the "UPnP" on your router.

Honey

Doesn't seem to work for me on 32bit, I've UPnP Enabled but it still crashes my server !

Spidey

what the?

Loaded plugin: squirrel04rel32

Loaded plugin: xmlconf04rel32

Loaded plugin: sockets04rel32

Loaded plugin: hashing04rel32

Loaded plugin: announce_verbose

Loaded plugin: UPnPPortMapper-rel32

One or more plugins failed to initialise, quitting.

[MODULE]  Loaded SqVCMP 0.4 frontend by Stormeus. (v1.0)
scripts/main.nut line = (742) column = (2) : error expression expected
[WARNING] Could not load script 'scripts/main.nut'
[WARNING] expression expected
[ERROR]   No Squirrel gamemode was specified.
gta vc and san are my favourite games

Thijn

The error expression expected isn't to do with this plugin.
Are you sure there aren't any plugin errors above this?

KAKAN

WHat would this plugin do?
It'll automatically forward our ports?
oh no