Jump to content
  • 0

Warning Unexpected type for argument 1


LearningRO

Question


  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

Hi, Someone can fix this script event from Godammit
 

prontera,150,180,4	script	SafeZoneEvent	100,{
	if(.event==2)end;
	select("[Join]");
	if(!.event)initnpctimer;
	warp "ggpro",19,19;
	set .event,1;
	end;
OnTimer5000:
	mapannounce "ggpro","[System]:Game Start",bc_map;
	sleep 3000;
	for(set .@i,1;.@i<=10;set .@i,.@i+1)
		callsub Start;
	mapannounce "ggpro","[System]:Game Over",bc_map;
	sleep 3000;
	callsub WarpNoSafe;
	end;
Start:
	set .event,2;
	set .e_x,rand(1,35);
	set .e_y,rand(1,35);
	set .e_t,5;
	callsub WarpShow,.e_x,.e_y;
	while(sleep(1000))
		if(set(.e_t,.e_t-1)<0)
			break;
		else
			callsub ShowEffect;
	callsub WarpNoSafe,.e_x,.e_y;
	sleep 1000;
	return;
OnInit:
	callsub WarpNoSafe;
	end;
WarpNoSafe:
	if(!getarg(0,0)&&!getarg(1,0))
	{
		mapwarp "ggpro","prontera",150,180;
		set .event,0;
		set .e_x,0;
		set .e_y,0;
		set .e_t,0;
		return;
	}
	areawarp	"ggpro",0,0,40,getarg(1)-1,"prontera",150,180;
	areawarp	"ggpro",0,getarg(1)+3,40,40,"prontera",150,180;
	areawarp	"ggpro",0,getarg(1),getarg(0)-1,getarg(1)+2,"prontera",150,180;
	areawarp	"ggpro",getarg(0)+3,getarg(1),40,getarg(1)+2,"prontera",150,180;
	return;
ShowEffect:
	for(set .@i,1; .@i<=8; set .@i,.@i+1)
		initnpctimer "SafeZoneEvent#Effect"+.@i;
	return;
WarpShow:
	movenpc	"SafeZoneEvent#Effect1",getarg(0),getarg(1);
	movenpc	"SafeZoneEvent#Effect2",getarg(0)+1,getarg(1);
	movenpc	"SafeZoneEvent#Effect3",getarg(0)+2,getarg(1);
	movenpc	"SafeZoneEvent#Effect4",getarg(0),getarg(1)+1;
	movenpc	"SafeZoneEvent#Effect5",getarg(0),getarg(1)+2;
	movenpc	"SafeZoneEvent#Effect6",getarg(0)+1,getarg(1)+2;
	movenpc	"SafeZoneEvent#Effect7",getarg(0)+2,getarg(1)+2;
	movenpc	"SafeZoneEvent#Effect8",getarg(0)+2,getarg(1)+1;
	return;
}


ggpro,1,1,0	script	SafeZoneEvent#Effect1	139,{
OnTimer100:
	specialeffect 315;
	end;
}
ggpro,1,1,0	duplicate(SafeZoneEvent#Effect1)	SafeZoneEvent#Effect2	139
ggpro,1,1,0	duplicate(SafeZoneEvent#Effect1)	SafeZoneEvent#Effect3	139
ggpro,1,1,0	duplicate(SafeZoneEvent#Effect1)	SafeZoneEvent#Effect4	139
ggpro,1,1,0	duplicate(SafeZoneEvent#Effect1)	SafeZoneEvent#Effect5	139
ggpro,1,1,0	duplicate(SafeZoneEvent#Effect1)	SafeZoneEvent#Effect6	139
ggpro,1,1,0	duplicate(SafeZoneEvent#Effect1)	SafeZoneEvent#Effect7	139
ggpro,1,1,0	duplicate(SafeZoneEvent#Effect1)	SafeZoneEvent#Effect8	139


I alwasy get this warning a loot even all player get kick all

 

[Warning]: Unexpected type for argument 1. Expected number.
[Debug]: Data: label pos=495
[Debug]: Function: jump_zero
[Debug]: Source (NPC): SafeZoneEvent at prontera (150,180)
[Warning]: Unexpected type for argument 1. Expected number.
[Debug]: Data: label pos=495
[Debug]: Function: jump_zero
[Debug]: Source (NPC): SafeZoneEvent at prontera (150,180)
[Warning]: Unexpected type for argument 1. Expected number.
[Debug]: Data: label pos=495
[Debug]: Function: jump_zero
[Debug]: Source (NPC): SafeZoneEvent at prontera (150,180)

 

Edited by LearningRO
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2347
  • Joined:  10/28/11
  • Last Seen:  

try change

if(!getarg(0,0)&&!getarg(1,0))

into

if (getargcount() < 2)

 

Link to comment
Share on other sites

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.

×
×
  • Create New...