I am rewriting all my scripts not using functions in attributes.inc like
GetStamina() or GetHp()
I don't know if it is the case also to substituite also SetBaseIntelligence() for exampe.
The code is:
Code:
function SetBaseIntelligence(who, intelligence)
intelligence := Cint(intelligence * 10);
if(intelligence < 10)
intelligence := 10;
elseif(intelligence > CORE_SETTINGS_MAX_ATTRIBUTE)
intelligence := CORE_SETTINGS_MAX_ATTRIBUTE;
endif
var ret := SetAttributeBaseValue(who, ATTRIBUTEID_INTELLIGENCE, intelligence);
if(ret)
DoRecalcVitals(who);
endif
return ret;
endfunction
If I don't' check
if(intelligence < 10)
for exampe
SetAttributeBaseValue(who, ATTRIBUTEID_INTELLIGENCE, intelligence)
do not report error to script if intelligence < 0 ?