This is an attempt to use python to, effectively add science production to a city. So far, what I've gotten from the python API and trying out a bunch of functions, is this:
Problem is that nothing I've tried so far in the something slot is actually working. (In the BTS API page its in the CyPlayer section, so I've tried both pPlayer and iPlayer. I also tried nothing, and whichever function gives the team of the player, since the other research function seems ot be based on the team rather than the player.)
Problem is I keep getting an error saying something like "function getCurrentResearch not found in CyPlayer" or something along those lines (I forget the exact warning.) On the API page, its listed as this:
For the actual questions: Am I using the right function for what I've trying to do (Get the technology that is currently being researched), what needs to go before it to actually get it working, and if it isn't the right function, is there one that will work for what I'm trying to do?
(i did look up in the API for some other technology related functions, and I think I've got the role and the form sort of right from other patterns in the API, but obviously something's missing.)
Code:
PyPlayer(iPlayer).getTeam().changeResearchProgress([B]Something[/B].getCurrentResearch(), iScience, pPlayer)
Problem is that nothing I've tried so far in the something slot is actually working. (In the BTS API page its in the CyPlayer section, so I've tried both pPlayer and iPlayer. I also tried nothing, and whichever function gives the team of the player, since the other research function seems ot be based on the team rather than the player.)
Problem is I keep getting an error saying something like "function getCurrentResearch not found in CyPlayer" or something along those lines (I forget the exact warning.) On the API page, its listed as this:
Code:
TechType getCurrentResearch ()
int ()
For the actual questions: Am I using the right function for what I've trying to do (Get the technology that is currently being researched), what needs to go before it to actually get it working, and if it isn't the right function, is there one that will work for what I'm trying to do?
(i did look up in the API for some other technology related functions, and I think I've got the role and the form sort of right from other patterns in the API, but obviously something's missing.)