summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-03-11 03:38:01 +0100
committerGitHub <noreply@github.com>2019-03-11 03:38:01 +0100
commit22ec5d452d4abdfa0da335992607757a9cb2e2d1 (patch)
treeaa9ae7cb5faf8f3fb60c1d0fddc2d83d831aedaa /src/map/script.c
parente78a3b536566c1ff15960fa747995ac5b6307112 (diff)
parent98ae816147a28ce98676b92a41d42be65365ff31 (diff)
downloadhercules-22ec5d452d4abdfa0da335992607757a9cb2e2d1.tar.gz
hercules-22ec5d452d4abdfa0da335992607757a9cb2e2d1.tar.bz2
hercules-22ec5d452d4abdfa0da335992607757a9cb2e2d1.tar.xz
hercules-22ec5d452d4abdfa0da335992607757a9cb2e2d1.zip
Merge pull request #2391 from AnnieRuru/64-setunitdata_phase_1
setunitdata/getunitdata clean up. Phase 1
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 23793e54a..17b93af37 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -18679,6 +18679,10 @@ static BUILDIN(getunittype)
* @param4 Value#2 Optional int value to be passed for certain data types.
* @param5 Value#3 Optional int value to be passed for certain data types.
* @return 1 on success, 0 on failure.
+
+ Note: Please make this script command only modify ONE INTEGER value.
+ If need to modify string type data, or having multiple arguments, please
+ introduce a new script command.
*/
static BUILDIN(setunitdata)
{
@@ -18704,7 +18708,7 @@ static BUILDIN(setunitdata)
return false;
}
- /* Mandatory Argument 3 */
+ /* Mandatory Argument 3. Subject to deprecate. */
if (type == UDT_MAPIDXY) {
if (!script_isstringtype(st, 4)) {
ShowError("buildin_setunitdata: Invalid data type for argument #3.\n");
@@ -19796,6 +19800,10 @@ static BUILDIN(setunitdata)
* @param2 DataType Type of Data to be set for the unit.
* @param3 Variable array reference to store data into. (used for UDT_MAPIDXY)
* @return 0 on failure, <value> on success
+
+ Note: Please make this script command only return ONE INTEGER value.
+ If the unit data having multiple arguments, or need to return in array,
+ please introduce a new script command.
*/
static BUILDIN(getunitdata)
{
@@ -19823,7 +19831,7 @@ static BUILDIN(getunitdata)
return false;
}
- /* Argument checks */
+ /* Argument checks. Subject to deprecate */
if (type == UDT_MAPIDXY) {
if (data == NULL || !data_isreference(data)) {
ShowWarning("buildin_getunitdata: Error in argument 3. Please provide a reference variable to store values in.\n");