Hercules Elf Bot - Aug 7, 2012 19:12
Originally posted by [b]QQfoolsorellina[/b]
the parameter is constant type ---> work perfectly
[code]
prontera,160,180,4 script TestNpc 904,{
mes replacestr("test test test test test","test","yay", 0,2);
close;
}
[/code]
the parameter is variable type ---> st->state = END;
[code]
prontera,158,180,4 script TestNpc2 904,{
set .@am,2;
mes replacestr("test test test test test","test","yay", 0,.@am);
close;
}
[/code]
script_isint(st,n) doesn't seems receive variable type of value
This post has been edited by
QQfoolsorellina
on Aug 8, 2012 2:09
Hercules Elf Bot - Aug 7, 2012 23:42
Originally posted by [b]Cookie[/b]
Fixed in the latest revision [rev=16600]
Hercules Elf Bot - Aug 8, 2012 2:39
Originally posted by [b]QQfoolsorellina[/b]
There are still some bugs ,I think the major reason for this was the function script_isint(st,i) didn't allow variable integers injected
also same bug with script_isstring
e.g:
[code]
prontera,158,180,4 script TestNpc2 904,{
set .@am,2;
set .@uc,0;
mes replacestr("test test test test test","test","yay",.@uc,.@am);
close;
}
[/code]
when I click the npc map server consle show the below warning
[code]
[Error]: script:replacestr: Invalid usecase value. Expected int got string
[Debug]: Source (NPC): TestNpc2 at prontera (158,180)
[/code]
[i]There were also problems with [/i][b]*countstr(<input>, <search>{, <[color=#ff0000]usecase[/color]>})[/b]
the passed parameter was variable type ---> st->state = END;
[code]
prontera,160,180,4 script TestNpc 904,{
set .@uc,0;
mes ""+countstr("test test test Test", "test"); //returns 3
mes ""+countstr("cake Cake", "Cake", .@uc); //returns 2
close;
[/code]
This post has been edited by
QQfoolsorellina
on Aug 9, 2012 10:44
Hercules Elf Bot - Aug 8, 2012 16:46
Originally posted by [b]QQfoolsorellina[/b]
The root problem script_isint and script_isstring wasn't fixed
Hope devs can check this thx.
Hercules Elf Bot - Aug 9, 2012 10:46
Originally posted by [b]QQfoolsorellina[/b]
bump! Is there possible to let the script_isint and script_isstring function can receive variable type parameter ?
This post has been edited by
QQfoolsorellina
on Aug 9, 2012 10:50
Hercules Elf Bot - Sep 8, 2012 18:30
Originally posted by [b]Ind[/b]
Should be fixed in [rev=16763]