#3133: Unable to order cyborg engineer production via JS api
------------------------------------+-------------------------------------
 Reporter:  NoQ                     |             Owner:  Per
     Type:  bug                     |            Status:  new
 Priority:  normal                  |         Milestone:  unspecified
Component:  Engine: Scripting / AI  |           Version:  3.1_beta1
 Keywords:                          |        Blocked By:
 Blocking:                          |  Operating System:  All/Non-Specific
------------------------------------+-------------------------------------
 The following code
 {{{
 var factories = enumStruct(me, borgfac);
 for (var i=0; i<factories.length; ++i) {
         var struct=factories[i];
         if (structureIdle(struct)) {
                 return buildDroid(struct, "Truck", "Cyb-Bod-ComEng",
 "CyborgLegs", "", DROID_CONSTRUCT, "CyborgSpade");
         }
 }
 }}}
 doesn't work and produces the following error messages:
 {{{
 error   |03:26:12: [js_buildDroid] Invalid template Truck for factory
 A0CyborgFactory
 error   |03:26:12: [callFunction] 0 : <anonymous>()@multiplay/skirmish
 /nullbot-mr-0-8.js:841
 info    |03:26:12: [callFunction] Uncaught exception calling function
 "produceDroids" at line 841: ReferenceError:
 validTemplateForFactory(psTemplate, psStruct) failed in js_buildDroid at
 line 887
 info    |03:26:12: [callFunction] Assert in Warzone: qtscript.cpp:108
 (false), last script event: 'N/A'
 }}}

-- 
Ticket URL: <http://developer.wz2100.net/ticket/3133>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to