Zirius
New member
- Messages
- 261
- Points
- 0
hello, I am currently using the snippet:
switch(select(gettime(6),(gettime(6)+1),(gettime(6)+2))){ case 1: .@month = gettime(6); break; case 2: .@month = (gettime(6)+1); break; case 3: .@month = (gettime(6)+2); break;}
As you can see, I am using function that returns an integer inside a select() function, it works great, except that console keeps showing debug at console because ofc select requires string
Thank you!
switch(select(gettime(6),(gettime(6)+1),(gettime(6)+2))){ case 1: .@month = gettime(6); break; case 2: .@month = (gettime(6)+1); break; case 3: .@month = (gettime(6)+2); break;}
As you can see, I am using function that returns an integer inside a select() function, it works great, except that console keeps showing debug at console because ofc select requires string
is there a way I can convert those gettime() into a string so I can use it inside select() function without showing debug errors?[Warning]: Unexpected type for argument 1. Expected string.
[Debug]: Data: number value=2
[Debug]: Function: select
Thank you!