Jump to content
  • 0

[Error] - script_rid2sd player not attached


Question

Posted

Hi, can anyone help me to this error. Here's my script. This is a sample tarot event. If you have better than this sample. Please help. 

 

Thanks,

izlude,128,113,5	script	sdkfjsdf	100,{
	if ( .event == 2 ) end;
	else if ( .event == 1 ) {
		set .aid[ getarraysize(.aid) ], getcharid(3);
		announce strcharinfo(0) +" join in", 8;
		end;
	}
	announce "5 seconds to register", 1;
	set .event, 1;
	deletearray .aid;
	sleep 5000;
	set .event, 2;
	announce "event start", 8;
	while ( getarraysize(.aid) > 1 ) {
		sleep 1000;
		announce "attaching "+ rid2name(.aid[.@i]), bc_map;
		attachrid .aid[.@i];
		switch ( rand(523,526) ) {
			case 523:
				specialeffect2 523;
				set sp, 0;
				break;
			case 524:
				specialeffect2 524;
				sc_start SC_INCMATKRATE, 30000, -50;
				break;
			case 525:
				specialeffect2 525;
				sc_end sc_incagi;
				// .... all positive buff
				break;
			case 526:
				specialeffect2 526;
				if ( hp - 10000 < 0 ) {
					unitkill getcharid(3);
					deletearray .aid[.@i], 1;
					set .@i, .@i -1;
				}
				else
					set hp, hp - 10000;
				break;
		}
		set .@i, .@i +1 ;
		if ( .@i == getarraysize(.aid) ) {
			set .@i, 0;
			set .@round, .@round +1 ;
			announce "round "+ .@round, bc_map;
		}
	}
	if ( .aid == 0 )
		announce "nobody win", bc_map;
	else {
		announce "winner is "+ rid2name(.aid) , bc_map;
		attachrid .aid;
		getitem 501, 1;
	}
	set .event, 0;
	end;
}

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...