Switch expressions must be integral numbers - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: SOMA (https://www.frictionalgames.com/forum/forum-55.html) +--- Forum: User created content (https://www.frictionalgames.com/forum/forum-79.html) +--- Thread: Switch expressions must be integral numbers (/thread-56780.html) |
Switch expressions must be integral numbers - adriartilol - 06-29-2020 I've tried to code a switch statement in my .hps file, I got a few errors but was able to fix them properly. But there's just this one error that I don't understand and I don't know where the source of it is. Error message: [attachment=6856] Switch statement code: void WakeUpSequence(const tString &in asSequence){ switch("WakeUpSequence"){ // Preparing stuff for the intro sequence case 1: Player_SetActive(false); Effect_Fade_Out(0.1); Player_SetHealth(3); Player_SetMaxHealth(3); Player_FadeRollTo(45, 56, 100); Player_SetCrouching(true, true, true); Player_StartLookAt("ceiling_spot_hanging_1", 23, 35, 40); break; // Start the actual intro sequence case 2: Effect_Fade_In(5); Player_StartLookAt("bgdoor1", 10, 13, 15); // More to be added break; } } If someone could tell me what the source of the error is, it'd be much appreciated RE: Switch expressions must be integral numbers - TiManGames - 07-02-2020 Hi. This is not how you use a switch expression, nor a sequence. Use the AngelScript tutorial to get help with such topics, it's explained fairly well: https://wiki.frictionalgames.com/hpl3/community/scripting/angelscript_tutorial RE: Switch expressions must be integral numbers - adriartilol - 07-02-2020 (07-02-2020, 10:59 AM)TiManGames Wrote: Hi. This is not how you use a switch expression, nor a sequence. ok, thanks |