- Joined
- May 10, 2016
- Messages
- 446
- Reaction score
- 17
- First Language
- French
- Primarily Uses
When I run this code I get objet is not a function if the code go to the default switch.
Any idea why% thanks.
Any idea why% thanks.
Code:
var tint=$dataMap.meta.tint;
switch(tint) {
case "night": $gameScreen.startTint([-102,-85,0,170], 1); break;
case "morning": $gameScreen.startTint([-34,-17,10,68], 1); break;
case "day": $gameScreen.startTint([0,0,0,0], 1); break;
case "evening": $gameScreen.startTint([17,-34,-68,17], 1); break;
case undefined: break;
default:
var t=tint.split(',').map(Number);
$gameScreen.startTint([t(0),t(1),t(2),t(3)], 1);
}
