Fixed getcharid according to samples and docs

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9098 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
Lupus
2006-10-30 12:28:23 +00:00
parent 177d603941
commit f7442ef2b3
2 changed files with 5 additions and 2 deletions

View File

@@ -5636,8 +5636,8 @@ int buildin_getcharid(struct script_state *st)
sd=map_nick2sd(conv_str(st,& (st->stack->stack_data[st->start+3])));
else
sd=script_rid2sd(st);
if(sd==NULL){
push_val(st->stack,C_INT,-1);
if(sd==NULL || num<0 || num>3){
push_val(st->stack,C_INT,0); //return 0, according docs
return 0;
}
if(num==0)