no.1 bug I found is $prace_bidders is actually an array
inside the OnInit: do deletearray $prace_bidders instead of set it 0 ..
no.2 bug is you changed prace_playing into @prace_playing
means if the one who 1st placed the betting log out, the rest won't get the price
for(set .@i,0; .@i < (getarraysize($prace_bidders)); set .@i, .@i + 1){
if(attachrid($prace_bidders[.@i])){
if (@prace_playing!=1) end;
.......
}it ends the script immediatelymaybe change it to continue; might work
no.3
have you try login 2 accounts and start the bet with both of them ?
it seems this script start the npc timer THE MOMENT ANY PLAYER placed their bets
I thought, an event script like this, the npc timer shouldn't be controlled by the players, but from OnClock something ...
even if you want to do it that way, you should use a npc variable .start or something and check if the event has already started or not...
haiz ... I don't understand why the timer is set to 60000 for registration and set to 0 when the race going to start
... really made me misunderstood that part, I don't think any normal scripter will want to script it this way
... hmm .. too unoptimized ... to read ... nvm ... reading this script seriously hurting my eyes ...
how come you can get the race started ?
the startnpctimer is located inside a function,
and I thought npc timer has to be on the npc itself ? <-- not tested
tested ... can ... wtf ... I just know about this ... I used *sleep too much <.<
seriously ... I would rather rewrite the whole script than just keep guessing where the bug come from
the labels jump here and there makes this script seriously hard to read
I getting this error after finally get the race started
[Error]: script:run_func: C_ARG not found. please report this!!!
[Debug]: Source (NPC): Poring#prace1 at cydonia (103,54)dunno what kind of error is thisbut don't feel like debug this script anymore
I would prefer that you translate the script made by Masao instead of using this hard to read script