Question Nuke script trouble

DeletedUser120763

Guest
Anyone else have this issue. I'm in the process of turning this nuke script into a support script. The script seems to fail at inserting total number of heavy cav into the rally point and gives you 1000000 units instead of all.

javascript:var Tsalkapone_coords='PUT CO ORDS HERE';var snob=0;var spy=0; var ram=0;var catapult=0; var light=0; var heavy=1e6; var marcher=0;var axe=0;var spear=1e6; var archer=0; var sword=0; var Tsalkapone_script_title='Support';var Tsalkapone_cookieID='Support1';$.getScript('https://dl.dropboxusercontent.com/s/uqon51aliz193wm/Tsalkapone.Nuke_Support_script_ek.js');void 0;
 

Attachments

  • Script error.png
    Script error.png
    149.2 KB · Views: 38

Ibra Gonza II

Non-stop Poster
Reaction score
140
Of course it does, you are entering var heavy = 1e6 which equals one million.

If you want to insert all units (of HC) you can use this:
Code:
$("#unit_input_heavy").attr('data-all-count');

Which will find the input of the heavy cav, get it's all-count attribute (an attribute that contains the maximum troops you can insert for this field). You can then just insert the value this returns into that box.
 

DeletedUser120763

Guest
Gave it a try. No luck. What i don't understand is why var " " = 1e6 works with all the other units except heavy cav.
 

DeletedUser120763

Guest
Thank you very much. :D
Im not much into scripting. but i tinker here and there to learn how things work.
 
Top