• 0
Sign in to follow this  
utofaery

function max Arguement limit

Question

1.

How many arguements can we pass into function?  like the maximum getarg(max) can get???

2.

Can we getarraysize that is define in the npc without cloning the array inside the function?

example function has :

[email protected] = getarraysize(getarg(0));

return [email protected];

example npc 1 array

[email protected] , 1, 2, 3;

example in npc 2 :

callfunc ("F_arraysize", getvariableofnpc([email protected], npc 1);

will this turn out or return the arraysize correctly?

 

or do we need to clone /duplicate the array inside the function to make getarraysize to work correctly?

 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

1. most of the time, if it doesn't mention any limit, it will be INT, means 2147483648 ... although might need some serious test to test the limit

2. no, getarraysize doesn't support look up to another npc

npc variable .var can be done with

getarg( X, getarraysize( getvariableofnpc( .var, <npc name> ) ) )

scope variable [email protected] cannot retrieve like that, as it run per script state

 

 

4 hours ago, utofaery said:

callfunc ("F_arraysize", getvariableofnpc([email protected], npc 1);

[email protected] is a scope variable, server throw error

prontera,155,185,5	script	khfksjhf	1_F_MARIA,{
	.@a = 1;
	dispbottom getvariableofnpc( .@a, strnpcinfo(0) ) +"";
	end;
}
[Error]: buildin_getvariableofnpc: invalid scope (not npc variable)
[Debug]: Data: variable name='[email protected]' index=0
[Debug]: Source (NPC): khfksjhf at prontera (155,185)

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this