Error with array i guess

nana

New member
Messages
67
Points
0
Location
Mexico
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
default_sad.png


errorhora.PNG

 
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

Code:
setarray .Scheds[0],0,16,50,0,0,0;     announce "inicio Dia "+.Scheds[0]+" hora " +.Scheds[1]+" min " +.Scheds[2],bc_all|bc_woe;
 
Last edited by a moderator:
Back
Top