rathena/rathena

`switch` script command not working when used in event labels

Closed this issue · 2 comments

rAthena Hash

f85ca81

Client Date

2021-11-03

Server Mode

Pre-Renewal

Result

I updated rAthena from hash to above version, now switch commands not working when used with labels. I also tested with this script in clean fresh install of rAthena, mes "test"; window appears then nothing else. All 3 event labels are not working.

-	script	SwitchTest	FAKE_NPC,{
OnCommand:
OnPCLoginEvent:
OnNPCKillEvent:
	mes "test";
	switch(select("A:B:C")) {
	case 1:
		mes "1";
		break;
	case 2:
		mes "2";
		break;
	case 3:
		mes "3";
		break;
	}
	close;

OnInit:
	bindatcmd "test",strnpcinfo(0)+"::OnCommand";
	end;
}

I've only tested switch. Maybe there are other commands not working as well, not sure. Reverting back to hash makes it work again.

Relevant Log Output

No output, just character stuck (unable to walk, chat, anything) for eternity until he/she disconnects.

Expected Result

script commands working flawlessly.

How to Reproduce

Use labels on switch script command.

Official Information

N/A

Modifications that may affect results

No response

I think your issue is also related to #8321.

Could you please test the changes of #8330 and see if this fixes your issue?

Yes, it did fix the issue! Thank you @Lemongrass3110