Author Topic: Request of wiki update  (Read 1183 times)

0 Members and 1 Guest are viewing this topic.

Offline Szaman

  • Soldier
  • **
  • Posts: 145
Request of wiki update
« on: April 14, 2014, 05:40:20 am »
Hi,

I would like to ask you for a wiki update:
- adding (deleted recently imo) again a link to the scripting templates page (old wiki: http://devs-old.soldat.pl/index.php/Default_Scripts_Template)
- updating description of function:
Code: [Select]
function OnRequestGame(IP: string; State: integer): integer;because if you want to use:
Code: [Select]
function OnRequestGame(IP: string; State: integer): integer;
begin
  ForwardClient(IP, Reqport, '37.187.180.142', 23123, 'Bla bla bla');
  result:=state;
end;
You need to use that "reqport" - what is that btw? It's not a parameter of that function (RequestGame). Some global variable? And how it behaves when two or more ppl join that server in the same time? It's overwritten?

In the wiki there is suggestion of using GetPlayerStat(ID, 'port')... but there is no ID provided here, because the player has not joined yet...

So please, fix that documentation mess :)

Thx in advance.

Best regards,
Szaman.

Offline Akinaro

  • Flagrunner
  • ****
  • Posts: 749
Re: Request of wiki update
« Reply #1 on: April 14, 2014, 05:59:40 am »
 scripting templates page is still in wiki.soldat.pl
http://wiki.soldat.pl/index.php/Scripting_Templates
http://wiki.soldat.pl/index.php/Default_Scripts_Template

but moved to Scripts Database(first one, second is still intact)


beside its wiki , just register and edit that page :/
« Last Edit: April 14, 2014, 06:03:01 am by Akinaro »

Offline Szaman

  • Soldier
  • **
  • Posts: 145
Re: Request of wiki update
« Reply #2 on: April 14, 2014, 06:05:52 am »
I didn't know that this is open-wiki. I thought that you must have some additional rights/being approved by admin to edit this wiki :)

Ok, I will participate in it :)

But - the question about "what is reqport?" is still valid and I can not answer it on my own.

Offline Akinaro

  • Flagrunner
  • ****
  • Posts: 749
Re: Request of wiki update
« Reply #3 on: April 14, 2014, 06:26:14 am »
devlog from 2012-07-29
*Removed ReqFwd and ReqPort global variables
http://forums.soldat.pl/index.php?topic=42047.0

And here you have conversation about it:
http://www.nordicbots.com/?id=73&net=quakenet&cid=79122&year=2011&month=12&day=15&textonly=1&nocolors=0
« Last Edit: April 14, 2014, 06:30:38 am by Akinaro »

Offline Szaman

  • Soldier
  • **
  • Posts: 145
Re: Request of wiki update
« Reply #4 on: April 14, 2014, 07:11:46 am »
Nice that it is removed... but it still works ;)

So what would be a proper way to do it?
Code: [Select]
GetPlayerStat(IPToID(IP), 'port')?

It's still not bullet-proof - there could be many players from the same IP address.