I made a simple test script (run from the console) to try it out. Does anyone have any idea why this script always results in the output:
The first value is 0
The second value is 0
The third value is 0
The fourth value is 0
...when the script is run?
The script:
void ST_Debug(string sMsg, int bPrintToLog=FALSE) {
DisplayFloatyMessage(GetMainControlled(), sMsg, FLOATY_MESSAGE, 16777215, 10.0);
if (bPrintToLog)
PrintToLog(">>>>>>>>>> ST DEBUG:" + sMsg);
}
void main()
{
int nVal = 0;
// ---------------------------------------------------------
effect eTest = Effect(EFFECT_TYPE_TEST);
SetEffectInteger(eTest, 0, 10);
nVal = GetEffectInteger(eTest, 0);
ST_Debug("The first value is " + ToString(nVal));
SetEffectInteger(eTest, 10, 20);
nVal = GetEffectInteger(eTest, 10);
ST_Debug("The second value is " + ToString(nVal));
// ---------------------------------------------------------
effect eTest2 = EffectStun();
SetEffectInteger(eTest2, 0, 30);
nVal = GetEffectInteger(eTest2, 0);
ST_Debug("The third value is " + ToString(nVal));
SetEffectInteger(eTest2, 10, 40);
nVal = GetEffectInteger(eTest2, 10);
ST_Debug("The fourth value is " + ToString(nVal));
}
Modifié par stoffe -mkb-, 27 août 2010 - 02:19 .





Retour en haut






