Jump to content
  • 0
Sign in to follow this  
nana

Error with array i guess

Question

Hi 

 

I'm trying test this script, however the array dont get the args that i need:

 

setarray .Scheds[0],0,16,50,0,0,0;
 
announce "inicio Dia "+.@Scheds[0]+" hora " +.@Scheds[1]+" min " +.@Scheds[2],bc_all|bc_woe;
announce "inicio server Dia "+gettime(4)+" hora " +gettime(3)+" min " +gettime(2),bc_all|bc_woe;
 
Hoever i always get 0 0 0
 
I attach image
 
Can anyone help me?
 
What i'm doing wrong?

 

i read this http://herc.ws/wiki/Setarray and i dont get whats my error :(

post-392-0-83076400-1413150704_thumb.png

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Because you setup one kind of array in NPC variables, but use a scope array, which you didn't set.

setarray .Scheds[0],0,16,50,0,0,0;

You see, array is set as .Scheds;

 announce "inicio Dia "+.@Scheds[0]+" hora " +.@Scheds[1]+" min " +.@Scheds[2],bc_all|bc_woe;

But here you use .@Scheds;

You can either set .@Scheds in the setarray, or use .Scheds in the announce to fix that.

 

setarray .@Scheds[0],0,16,50,0,0,0;     announce "inicio Dia "+.@Scheds[0]+" hora " +.@Scheds[1]+" min " +.@Scheds[2],bc_all|bc_woe;

OR

setarray .Scheds[0],0,16,50,0,0,0;     announce "inicio Dia "+.Scheds[0]+" hora " +.Scheds[1]+" min " +.Scheds[2],bc_all|bc_woe;
Edited by Garr

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.