Asked — Edited

This Script Used To Work

Not sure what happened here. This tiny fun script used to work and now it does not. Anyone interested in taking a look at this.

IF ($month = 4 And $day =16)
sayezb("happy birthday christian")
sleep(1500)
 

ElseIf ($month = 4 And $day = 17)
sayezb("happy birthday natalie")
sleep(1500)
 

 

ElseIf($month = 6 And $day = 12)
sayezb("happy birthday grace")
sleep(1500)

 

 
ElseIF($month = 10 And $day = 21)
sayezb("happy birthday cole")
sleep(1500)

EndIf

ARC Pro

Upgrade to ARC Pro

Get access to the latest features and updates before they're released. You'll have everything that's needed to unleash your robot's potential!

PRO
USA
#1  

Works for me, what is it not doing?

#2  

Can you explain what its doing on your end? None of the days of the month are equal so it should not work, but it does?

#3  

BTW this script runs in my personality generator. It should not just randomly speaking "happy birthday" unless it is the actual birthday.

#4  

This script keeps looping for me. Shouldn't do that without a Goto and a label.

Try changing all your Elesif to Else like this (however I'm not sure Else will compare two things). If I do this at least it won't keep looping :


IF ($month = 4 And $day =16)
sayezb("happy birthday christian")
sleep(1500)
 
Else ($month = 4 And $day = 17)
sayezb("happy birthday natalie")
sleep(1500)
 
Else ($month = 6 And $day = 12)
sayezb("happy birthday grace")
sleep(1500)

Else ($month = 10 And $day = 21)
sayezb("happy birthday cole")
sleep(1500)

EndIf

Not sure anymore but I think you also may need a space after each else.

#5  

Work fine for me. It does nothing. If I change the Natalie one to today's date it says Happy Birthday Natalie, once.

PRO
Synthiam
#6  

Dave, you have a bunch of ELSE but they should be ELSEIF

I recommend using Blockly to learn how to program first. It's real easy and can't make mistakes.

PRO
Synthiam
#8  

It really helps with logic, for loops and specifically IF conditions. The most number of questions people experience when programming is IF conditions or loops. Blockly helps with that - at least to visually see what you're making