int nMaxIndex= GetCampaignInt(sDBName,"NumItems",oObject);
int nIndex;
for (nIndex = 1; nIndex
{
sItmCreate=GetCampaignString(sDBName,"Item_"+IntToString( nIndex )+"",oObject);
object oItem=CreateObject(OBJECT_TYPE_ITEM,sItmCreate,GetLocation(OBJECT_SELF) );
if( !GetIsObjectValid (oItem) )
{
int nMaxIndexProp= GetCampaignInt(sDBName,"Item_"+IntToString( nIndex )+"_MaxItemProps",oObject);
int nIndexProp;
for (nIndexProp = 1; nIndexProp
{
itemproperty ipProperty;
string ipString= GetCampaignString(sDBName,"Item_"+IntToString( nIndex )+"_ItemProp_"+IntToString( nIndexProp )+"",oObject );
ipProperty = StringToInt( ipString );
AddItemProperty(DURATION_TYPE_PERMANENT,ipProperty,oItem);
}//end of for item props
}//end of if oItem valid
}//end of for number of items
ipProperty = StringToInt( ipString ); as seen in this line I get...ERROR: MISMATCHED TYPES
yet a Item property is a int when whe use StringToInt(Get2DAString(string s2DA, string sColumn, int nRow);
so I'm perplexed by the error. And on the aboved script trying to make a function, i see I was trying to make string tokens and forgot to code that right. man i was tired yesterday when I posted it.
Modifié par Greyfort, 15 janvier 2011 - 04:52 .





Retour en haut






