Jump to content
  • 0

correct use of getd


Feilor

Question


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  135
  • Reputation:   17
  • Joined:  12/31/11
  • Last Seen:  

could someone help me with getd? i have this:

explode(.@opcoes$,getd(".@"+"enchantgroup"+(atoi(getarg(1))+1)+"$")[(rand(1,getarraysize(getd(".@"+"enchantgroup"+(atoi(getarg(1))+1)+"$")))-1)],",");


and i'm getting this error:

Quote

[Error]:  Loading NPC file: npc/inq.txt
script error on npc/inq.txt line 137
    parse_callfunc: not enough arguments, expected ','

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

6 minutes ago, luan122 said:

could someone help me with getd? i have this:


explode(.@opcoes$,getd(".@"+"enchantgroup"+(atoi(getarg(1))+1)+"$")[(rand(1,getarraysize(getd(".@"+"enchantgroup"+(atoi(getarg(1))+1)+"$")))-1)],",");


and i'm getting this error:

 

Hi, 

You could try searching at trunk/doc/script_command.txt

---------------------------------------



*getd("<variable name>")



Returns a reference to a variable, the name can be constructed dynamically.

Refer to 'setd' for usage.



This can also be used to set an array dynamically:

	setarray getd(".array[0]"), 1, 2, 3, 4, 5;



Examples:



	set getd("$varRefence"), 1;

	set @i, getd("$" + "pikachu");



---------------------------------------

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  135
  • Reputation:   17
  • Joined:  12/31/11
  • Last Seen:  

Just now, pajodex said:

Hi, 

You could try searching at trunk/doc/script_command.txt


---------------------------------------



*getd("<variable name>")



Returns a reference to a variable, the name can be constructed dynamically.

Refer to 'setd' for usage.



This can also be used to set an array dynamically:

	setarray getd(".array[0]"), 1, 2, 3, 4, 5;



Examples:



	set getd("$varRefence"), 1;

	set @i, getd("$" + "pikachu");



---------------------------------------

 

I know that, was there where i tried to learn but looks like i failed

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

19 minutes ago, luan122 said:

explode(.@opcoes$,getd(".@"+"enchantgroup"+(atoi(getarg(1))+1)+"$")[(rand(1,getarraysize(getd(".@"+"enchantgroup"+(atoi(getarg(1))+1)+"$")))-1)],",");

try this

explode(.@opcoes$,getd(".@"+"enchantgroup"+(atoi(getarg(1))+1)+"$"),[(rand(1,getarraysize(getd(".@"+"enchantgroup"+(atoi(getarg(1))+1)+"$")))-1)]);

 

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...