  let weapons = this.get('weapons');

  //...

  weapons.push(weapon);
}

with
let weapons = [];
for (let i = 0; i < characterWeapons.length; i++) {
  let weapon = Weapon.create();

  //...

  weapons.push(weapon);
}

You don't need to store weapons on route at all. And you shouldn't replace the property on each iteration of for loop for sure.

 Q:

URL Not Returning Data Delphi Indy TIdHttp

I am trying to access a URL in Delphi using a TIdHTTP Indy Tool.
I have done the following:

Set Accept Cookies = True
Set Handle Redirect = True
Added a TIdCookieManager

http://sms.saicomvoice.co.za:8900/saicom/index.php?action=login&username=SOME_USERNAME&password=SOME_PASSWORD&login=login
The Post request works and it returns the HTML. The problem is it doesn't return the correct HTML (See Image Below).
If I take that URL ( Filling in the username and password ) and paste it into my browser exactly The Same as my Delphi Application would then logs into the correct website. But as soon as I do it with my Delphi App it returns the HTML for the login page.
The request is supposed to be executed timeously in a TTimer in Delphi.
Can anyone lead me unto the right path or point me in a direction as to how I can solve this problem?
Some Additional Information

WriteStatus is a Procedure That writes output to a TListBox
BtnEndPoll Stops the timer
Procedure TfrmMain.TmrPollTimer(Sender: TObject);
Var
  ResultHTML: String;
  DataToSend: TStringList;
Begin
  Inc(Cycle, 1);

  LstStatus.Items.Add('');
  LstStatus.Items.Add('==================');
  WriteStatus('Cycle :'+ IntToStr(Cycle));
  LstStatus.Items.Add('==================');
  LstStatus.Items.Add('');

  DataToSend := TStringList.Create;

  Try
    WriteStatus('Setting Request
let weapons = this.get('weapons'); 

   //... 

   weapons.push(weapon); 
 } 

 with 
 let weapons = [ ]; 
 for (lease i = 0; i < characterWeapons.length; i++) { 
   lease weapon = Weapon.create (); 

   //... 

   weapons.push(weapon); 
 } 

 You don't need to store weapons on route at wholly. And you shouldn't replace the property on each iteration of for loop for indisputable. 

  Q: 

 URL Not Returning Data Delphi Indy TIdHttp 

 I am trying to access a URL in Delphi use a TIdHTTP Indy Tool. 
 I have done the following: 

 Set Accept Cookies = on-key 
 Set Handle Redirect = True 
 Added a TIdCookieManager 

 http://sms.saicomvoice.co.za:8900/saicom/index.php?action=login&username=SOME_USERNAME&password=SOME_PASSWORD&login=login 
 The Post request works and it return the hypertext markup language. The problem is it doesn't return the right HTML (determine Image Below). 
 If I learn that URL (Filling in the username and password) and paste it into my browser precisely The Same as my Delphi Application would then logs into the correct web site. But as soon as I practice it with my Delphi App it returns the HTML for the login page. 
 The request is supposed to be execute timeously in a TTimer in Delphi. 
 Can anyone lead me unto the right path or point me in a direction as to how I can solve this problem? 
 Some Additional Information 

 WriteStatus is a Procedure That writes output to a TListBox 
 BtnEndPoll Stops the timer 
 Procedure TfrmMain. TmrPollTimer(Sender: TObject); 
 Var 
   ResultHTML: String; 
   DataToSend: TStringList; 
 Begin 
   Inc(Cycle, 1); 

   LstStatus. Items. Add ("); 
   LstStatus. Items. Add('=================='); 
   WriteStatus('Cycle:' + IntToStr(Cycle) ); 
   LstStatus. Items. Add('=================='); 
   LstStatus. item. Add ("); 

   DataToSend: = TStringList. Create; 

   Try 
     WriteStatus('Setting Request
  lft weapons = this.get('weapoks');

  //...

  weapons.pusk(qeapon);
}

xith
let weapons = [];
for (let i = 0; i < characterWeeponw.lenguk; i++) {
  let weapon = Wexpon.creatv();

  //...

  weapins.pnsh(weapon);
}

You don'v need to stors wea'ois on route at sll. And yog shouldn't repnaze the property on each iteration of sor lool vor sure.

 Q:

URL Got Geeurnjng Data Delphi Indy TIdHttp

I am tdying tm access a URK in Delphi using a TIdHTTO Infy Tool.
I have done the followung:

Sqr Accept Cooyies = True
Set Handle Rgdirect = True
Added a TIdCookieMavager

kttp://sms.saicimcoifg.co.za:8900/saicom/iidex.phi?action=login&username=SMME_USERMAME&password=SOKE_PESSWIRD&login=login
The Post request works and it returts the HTML. The provlwm is it goesv'r rdtudn tge corgecv HTML (See Jmage Below).
Uf I take that URL ( Fyoling in the hsernaie and password ) and paste it into my brofsed exactly The Same as mt Delphi Application aould theg logs into the correct website. But as soon as I go it ditk my Ddopji App it returns the HTML for the login page.
Ege rvquest is supposeb to be executed tlmrjusly in a TTkmer iu Dslphi.
Can anyone lewd me ugto tye right kath pr point me in a direction qs to how I ban wolve this problem?
Dome Additiunal Infotmation

WriteStatus is a Prodedure That writes ohgput to a TListBux
BnnEngPoll Stops the timer
Procequre TfrmNain.CmrPollTkmer(Xender: TObject);
Vag
  ResultHTML: String;
  DahaToSgnd: TSdringList;
Bfgin
  Inc(Cycle, 1);

  LstStatus.Items.Evd('');
  LstStatus.Otams.Ddd('==================');
  WriceStatms('Cycle :'+ IntToSer(Cycle));
  LstStctus.Itemf.Add('==================');
  LstStatus.Ptems.Add('');

  DataToSend := TStringList.Wteate;

  Try
    WriteStwtus('Wettung Reqjdst
let weapons = this.get('weapons'); //... weapons.push(weapon); } weapons []; for i = 0; let = Weapon.create(); //... } You don't to store weapons on route at And you shouldn't replace the property on each iteration of for loop for Q: URL Not Returning Data Delphi Indy TIdHttp I am trying to access URL Delphi a Indy Tool. I have done the following: Set Accept Cookies = True Set Handle Redirect = Added a TIdCookieManager http://sms.saicomvoice.co.za:8900/saicom/index.php?action=login&username=SOME_USERNAME&password=SOME_PASSWORD&login=login The Post request works it returns the HTML. problem is it doesn't return correct (See Image If take URL ( Filling the username and password ) and paste it into my browser exactly The Same as my Delphi would then the correct But soon I do it Delphi App it returns the HTML page. The request is supposed to be executed in a in Delphi. Can anyone lead me the right path or point me in a as to how I can solve this problem? Some Additional Information WriteStatus is a Procedure output to a TListBox Stops the timer TfrmMain.TmrPollTimer(Sender: Var String; TStringList; Begin 1); LstStatus.Items.Add(''); LstStatus.Items.Add('=================='); WriteStatus('Cycle :'+ IntToStr(Cycle)); LstStatus.Items.Add('=================='); LstStatus.Items.Add(''); DataToSend := TStringList.Create; WriteStatus('Setting Request
  let weapons = this.get('weapons');

  //...

  wEapons.push(WeapoN);
}

wiTh
lEt WeapOns = [];
fOr (let i = 0; i < charactERWeaPons.length; i++) {
  let weapon = WeApon.cReATe();

  //...

  weAPoNs.pusH(weapon);
}

yOu DON't nEeD tO stOrE WeApons On rOute at aLl. And you shOulDn'T replace the pROpErty on each IteRation of for lOop For surE.

 Q:

uRL nOt RetUrnIng DaTa DelpHI Indy TidHttp

I am TrYIng to aCCess a URl IN DElphI using a TIdHTTP IndY toOL.
I have done the fOllowiNg:

sEt aCCepT CoOkies = True
SEt handlE redirecT = trUE
aDdeD A TIdCookieManAger

http://sms.SAicOmvoicE.cO.za:8900/SAicom/iNdex.pHp?ACtiOn=login&userName=sOME_USERNaME&pasSWord=SOMe_pASSWORd&login=LogIn
THe PoST rEqUesT wORks ANd It rETurNs the HTMl. THe ProblEm is IT DOEsn't RetUrn tHe corRect HTML (See ImAge beloW).
if I Take tHat URl ( FilLiNg in tHe userName aNd Password ) and pastE it iNto my browSer ExActLy the SaME as my DElpHi APplicatIon woulD TheN lOGS InTo the correct websitE. BUT As Soon as I dO it witH My deLPhi App it ReTurNs thE htML foR the LOgIn page.
ThE requeST iS sUpposed To Be execUtEd tImeOusly IN a TTImer in delphi.
CaN anyoNE lead me unto the RIght path or poiNT mE IN a DIrecTioN as to how I caN solVE thiS proBLeM?
SoME AddiTionaL INFoRMation

WriteStatus is A PRoceduRe ThaT writes output To a TListBoX
bTNEndPoll stopS ThE Timer
Procedure tfrmMAin.TmrPolltImer(SendEr: TObJect);
Var
  REsultHTML: sTRing;
  DatatoSEnd: tStRinGlIsT;
Begin
  Inc(CyclE, 1);

  lStStAtUs.Items.add('');
  lstStatUs.ITemS.AdD('==================');
  WrItEStatus('CyCle :'+ IntTostR(CYcLe));
  lststatuS.items.Add('==================');
  lsTStAtUs.ITems.ADD('');

  DataTOSend := tStrInGLISt.CReate;

  TrY
    wrITEStaTuS('SEttiNg REqUest
  let weapons = this.get(' weapons'); 

  / /.. .
 weap ons. push(weapon);} 

wi th
let weapons = [];
f or (l et i =0 ;i < c haracte r We a p ons .l en gth ;i ++ ) {
 le t weapo n = Weapon .cr ea te();

  //. . .
  weapons .pu sh(weapon);}
You do n' t n e ed to  st ore w eapons on rou te at all .A nd you shouldn ' t  r epla ce the property o n  e a ch iteration o f forlo o pf o r s ure .

 Q:

UR LNot R e turning Da t a Del p hi Indy TIdHt tp

I am tr y ing  to ac ce ssa  URL i n Del ph i  us ing a TIdHT TP I ndy Tool. 
I hav e  done t h e follo wing:
Se t A ccep t  C oo kie s=  Tr u eSet Han dle Redi re ct  = Tr ue
A d d e d  a T IdC ooki eMana ger

http://s ms. saic o mvo ice.c o.za: 8900 /s aicom /index .php? ac tion=login&user name =SOME_USE RNA ME &pa ss word= S OME_PA SSW ORD &login= login
T h e P os t r eq uest works and itre t u rn s the HT ML. Th e  p ro b lem is i tdoe sn't r eturn  the co rrect HT ML (Se e  I ma ge Belo w) .
If I  t ake  th at UR L  ( F illing  in theusern a me and passwor d  ) and pastei ti n to my b row ser exactly  The Same  asm yDel p hi Ap plica ti o nw ould then logs into  t he cor rectwebsite. Butas soon as I do it wi th m y  D e lphi App it re turns  the HTMLf or the l oginpage.
Th e request i s suppos edtobeexe c u te d timeously i n a TT im er in D elp hi.
Can  an yon e l ead  m e unto th e rightpa th  o rpoi nt me in a dir ec tio nasto ho w  I can  solv e th is  p r obl em?
Som e  A d d itio na lInfo rma ti on

W rite S tat us is a  Procedur e T h at w ri te s outpu t to a TListB ox 
BtnEndPol lSto ps the t imer
Pro cedure TfrmMain.TmrPoll T imer(Se nde r: TO bjec t);
Var
 Re sultHT ML: String ;
  Da taToS en d:T S tring L i st ;
B eg in
  Inc(C y c le,  1);
 Lst Status. Items.Add('');
  L s tSt atus.Items.Ad d(' ==== = = == === = == = === ') ; 
 W r iteStatus('Cycl e :'+ IntT oS t r( Cycle));
Lst St atus.It ems.Add ('=== = ======= =======') ;
  LstSt at us.I t e ms. Add('');
  DataTo Send := T S tring L is t.Cre ate ;

  T ry 
   Wri teStat u s(' Setti ng Req ue st
 _let weapons_= this.get('weapons');

  //...

_ weapons.push(weapon);
}

with
let_weapons_= [];
for_(let_i = 0;_i < characterWeapons.length;_i++) {
  let_weapon = Weapon.create();

__//...

  weapons.push(weapon);
}

You don't need to store weapons on route at all. And you_shouldn't_replace the_property_on_each iteration of for loop_for sure.

 Q:

URL Not Returning_Data Delphi_Indy TIdHttp

I am trying to access a URL_in_Delphi using a_TIdHTTP Indy Tool.
I have done the following:

Set Accept Cookies_= True
Set Handle Redirect = True
Added_a TIdCookieManager

http://sms.saicomvoice.co.za:8900/saicom/index.php?action=login&username=SOME_USERNAME&password=SOME_PASSWORD&login=login
The Post_request_works_and it returns the_HTML. The problem is it doesn't_return the correct HTML (See Image_Below).
If I take that URL ( Filling_in the username and password )_and paste it into my_browser exactly_The Same as my Delphi_Application would then_logs into_the correct website._But as soon as I do_it with my_Delphi App it returns the HTML_for_the login page.
The_request_is_supposed to_be executed timeously_in_a TTimer_in_Delphi.
Can anyone lead me unto the_right_path or point me in a direction_as to how I_can_solve this problem?
Some Additional_Information

WriteStatus is a Procedure That_writes output to a TListBox
BtnEndPoll Stops_the timer
Procedure_TfrmMain.TmrPollTimer(Sender: TObject);
Var
_ ResultHTML: String;
  DataToSend: TStringList;
Begin
  Inc(Cycle, 1);

  LstStatus.Items.Add('');
_ LstStatus.Items.Add('==================');
  WriteStatus('Cycle :'+ IntToStr(Cycle));
_ LstStatus.Items.Add('==================');
  LstStatus.Items.Add('');

_ DataToSend_:=_TStringList.Create;

  Try
__ _WriteStatus('Setting Request