@@ -19767,7 +19767,7 @@ static BUILDIN(getunitdata)
19767
19767
19768
19768
if (bl == NULL) {
19769
19769
ShowWarning("buildin_getunitdata: Error in finding object with given GID %d!\n", script_getnum(st, 2));
19770
- script_pushint(st, 0 );
19770
+ script_pushint(st, -1 );
19771
19771
return false;
19772
19772
}
19773
19773
@@ -19776,15 +19776,15 @@ static BUILDIN(getunitdata)
19776
19776
/* Type check */
19777
19777
if (type < UDT_TYPE || type >= UDT_MAX) {
19778
19778
ShowError("buildin_getunitdata: Invalid unit data type %d provided.\n", type);
19779
- script_pushint(st, 0 );
19779
+ script_pushint(st, -1 );
19780
19780
return false;
19781
19781
}
19782
19782
19783
19783
/* Argument checks */
19784
19784
if (type == UDT_MAPIDXY) {
19785
19785
if (data == NULL || !data_isreference(data)) {
19786
19786
ShowWarning("buildin_getunitdata: Error in argument 3. Please provide a reference variable to store values in.\n");
19787
- script_pushint(st, 0 );
19787
+ script_pushint(st, -1 );
19788
19788
return false;
19789
19789
}
19790
19790
@@ -19794,7 +19794,7 @@ static BUILDIN(getunitdata)
19794
19794
sd = script->rid2sd(st);
19795
19795
if (sd == NULL) {
19796
19796
ShowWarning("buildin_getunitdata: Player not attached! Cannot use player variable %s.\n",name);
19797
- script_pushint(st, 0 );
19797
+ script_pushint(st, -1 );
19798
19798
return true;// no player attached
19799
19799
}
19800
19800
}
@@ -19864,7 +19864,7 @@ static BUILDIN(getunitdata)
19864
19864
case UDT_DMOTION: script_pushint(st, md->status.dmotion); break;
19865
19865
default:
19866
19866
ShowWarning("buildin_getunitdata: Invalid data type '%s' for Mob unit.\n", udtype);
19867
- script_pushint(st, 0 );
19867
+ script_pushint(st, -1 );
19868
19868
return false;
19869
19869
}
19870
19870
}
@@ -19921,7 +19921,7 @@ static BUILDIN(getunitdata)
19921
19921
case UDT_INTIMACY: script_pushint(st, hd->homunculus.intimacy); break;
19922
19922
default:
19923
19923
ShowWarning("buildin_getunitdata: Invalid data type '%s' for Homunculus unit.\n", udtype);
19924
- script_pushint(st, 0 );
19924
+ script_pushint(st, -1 );
19925
19925
return false;
19926
19926
}
19927
19927
}
@@ -19978,7 +19978,7 @@ static BUILDIN(getunitdata)
19978
19978
case UDT_INTIMACY: script_pushint(st, pd->pet.intimate); break;
19979
19979
default:
19980
19980
ShowWarning("buildin_getunitdata: Invalid data type '%s' for Pet unit.\n", udtype);
19981
- script_pushint(st, 0 );
19981
+ script_pushint(st, -1 );
19982
19982
return false;
19983
19983
}
19984
19984
}
@@ -20034,7 +20034,7 @@ static BUILDIN(getunitdata)
20034
20034
case UDT_LIFETIME: script_pushint(st, mc->mercenary.life_time); break;
20035
20035
default:
20036
20036
ShowWarning("buildin_getunitdata: Invalid data type '%s' for Mercenary unit.\n", udtype);
20037
- script_pushint(st, 0 );
20037
+ script_pushint(st, -1 );
20038
20038
return false;
20039
20039
}
20040
20040
}
@@ -20088,7 +20088,7 @@ static BUILDIN(getunitdata)
20088
20088
case UDT_MASTERCID: script_pushint(st, ed->elemental.char_id); break;
20089
20089
default:
20090
20090
ShowWarning("buildin_getunitdata: Invalid data type '%s' for Elemental unit.\n", udtype);
20091
- script_pushint(st, 0 );
20091
+ script_pushint(st, -1 );
20092
20092
return false;
20093
20093
}
20094
20094
}
@@ -20153,14 +20153,14 @@ static BUILDIN(getunitdata)
20153
20153
case UDT_BODY2: script_pushint(st, nd->vd.body_style); break;
20154
20154
default:
20155
20155
ShowWarning("buildin_getunitdata: Invalid data type '%s' for NPC unit.\n", udtype);
20156
- script_pushint(st, 0 );
20156
+ script_pushint(st, -1 );
20157
20157
return false;
20158
20158
}
20159
20159
}
20160
20160
break;
20161
20161
default:
20162
20162
ShowError("buildin_getunitdata: Unknown object!\n");
20163
- script_pushint(st, 0 );
20163
+ script_pushint(st, -1 );
20164
20164
return false;
20165
20165
} // end of bl->type switch
20166
20166
0 commit comments