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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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