Radio channel search error no = for Booleans or 32s

Can anyone see why the below script does not work, considering my Radio.stat attribute is set to integer?
Radio.stat = Radio.stat + 1
if (Radio.stat > 3) {
Radio.stat = 1
}
if (Radio.stat = 1) {
play sound ("", true, false)
play sound ("", false, true)
}
else if (Radio.stat = 2) {
play sound ("", true, false)
play sound ("", false, true)
}
else {
play sound ("", true, false)
play sound ("", false, true)
Radio.stat = 1
}


Are you getting an error message?


Error running script: Error compiling expression 'Radio.stat = 1': CompareElement: Operation 'Equal' is not defined for types 'Boolean' and 'Int32'

Radio has an attribute called stat is set to integer 1. So it really should work.


It says boolean, so the type of the stat attribute must have been changed at some point.
Is there some code somewhere else that could have changed that attribute to true or false?


No. In attributes, it is an integer. I did have it as a flag, but there are no scripts left that have it as a flag, and besides, the script specifies the attribute. So, I would expect it to work, but I think it might be that the sound is too much for the engine on my computer. I don't know if that's possible, but it seems like sound is difficult for it to cope with in some ways.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums