Working Example of the Sys_Get_AI_Storage_Long and Sys_Set_AI_Storage_Long functions |
Submitted by unnamed on Wed, 2007-06-20 20:24.
SE:V MODs
I'm looking for a working example of the Sys_Set_AI_Storage_Long and Sys_Get_AI_Storage_Long functions. All I want to do is save a single long value from one turn and retrieve it the next. Apparently what I'm doing is wrong, and my brain hurts from memorizing law bull****, so I dont have the patience to work it out myself right now. THanks
-unnamed

Re: Working Example of the Sys_Get_AI_Storage_Long and Sys_Set_A
Submitted by Thy Reaper on Fri, 2007-06-22 15:34.
What you've just described is exactly what he mentioned.
Stock's diplomacy makes use of these functions I believe. The syntax should be function(player_id, list_num, element_num).
So you'd call Set([player_id], 2, 1), then Get([player_id], 2, 1) on the subsequent turn. What's the code you're currently using?
-----
Space for rent - please contact owner




Re: Working Example of the Sys_Get_AI_Storage_Long and Sys_Set_A
As i remember, to save values from one turn to another there are special functions which described in scripting manual. Don't remember its names. It is in the section concerns AI. Theese functions save lists of values and you can access to certain value by giving the list number and listindex in the specified list as params to the function. Just like a two-dimensional array.