summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-07-30 11:55:45 -0400
committergumi <git@gumi.ca>2018-07-30 13:01:16 -0400
commit87eb2f98518a63a3f640b97ad62c8b18a5d6b946 (patch)
treeb56d31a13d363d1d706caf1d30cb3381b61f057f /src/map/atcommand.c
parenta28504fce050c8967b092759f1374d22c7a7ec0e (diff)
downloadhercules-87eb2f98518a63a3f640b97ad62c8b18a5d6b946.tar.gz
hercules-87eb2f98518a63a3f640b97ad62c8b18a5d6b946.tar.bz2
hercules-87eb2f98518a63a3f640b97ad62c8b18a5d6b946.tar.xz
hercules-87eb2f98518a63a3f640b97ad62c8b18a5d6b946.zip
always set the type when doing script->add_str
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index bedb58478..00a179ebb 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -8680,19 +8680,19 @@ ACMD(set)
const char *str = NULL;
switch (reg[0]) {
case '@':
- str = pc->readregstr(sd, script->add_str(reg));
+ str = pc->readregstr(sd, script->add_variable(reg));
break;
case '$':
- str = mapreg->readregstr(script->add_str(reg));
+ str = mapreg->readregstr(script->add_variable(reg));
break;
case '#':
if (reg[1] == '#')
- str = pc_readaccountreg2str(sd, script->add_str(reg));// global
+ str = pc_readaccountreg2str(sd, script->add_variable(reg));// global
else
- str = pc_readaccountregstr(sd, script->add_str(reg));// local
+ str = pc_readaccountregstr(sd, script->add_variable(reg));// local
break;
default:
- str = pc_readglobalreg_str(sd, script->add_str(reg));
+ str = pc_readglobalreg_str(sd, script->add_variable(reg));
break;
}
if (str == NULL || str[0] == '\0') {
@@ -8708,19 +8708,19 @@ ACMD(set)
data->type = C_INT;
switch( reg[0] ) {
case '@':
- data->u.num = pc->readreg(sd, script->add_str(reg));
+ data->u.num = pc->readreg(sd, script->add_variable(reg));
break;
case '$':
- data->u.num = mapreg->readreg(script->add_str(reg));
+ data->u.num = mapreg->readreg(script->add_variable(reg));
break;
case '#':
if( reg[1] == '#' )
- data->u.num = pc_readaccountreg2(sd, script->add_str(reg));// global
+ data->u.num = pc_readaccountreg2(sd, script->add_variable(reg));// global
else
- data->u.num = pc_readaccountreg(sd, script->add_str(reg));// local
+ data->u.num = pc_readaccountreg(sd, script->add_variable(reg));// local
break;
default:
- data->u.num = pc_readglobalreg(sd, script->add_str(reg));
+ data->u.num = pc_readglobalreg(sd, script->add_variable(reg));
break;
}
}