Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Switch expressions must be integral numbers
adriartilol Offline
Junior Member

Posts: 2
Threads: 1
Joined: Jun 2020
Reputation: 0
#1
Switch expressions must be integral numbers

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:

.png   Captura de pantalla (889).png (Size: 8.19 KB / Downloads: 264)

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(4556100);
                Player_SetCrouching(truetruetrue);
                Player_StartLookAt("ceiling_spot_hanging_1"233540);
                break;
            // Start the actual intro sequence
            case 2:
                Effect_Fade_In(5);
                Player_StartLookAt("bgdoor1"101315);
                // More to be added
                break;
        }
    }



If someone could tell me what the source of the error is, it'd be much appreciated
06-29-2020, 06:57 PM
Find
TiManGames Offline
Senior Member

Posts: 517
Threads: 25
Joined: May 2015
Reputation: 11
#2
RE: Switch expressions must be integral numbers

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/co...t_tutorial

This forum is dead
(This post was last modified: 07-02-2020, 11:01 AM by TiManGames.)
07-02-2020, 10:59 AM
Find
adriartilol Offline
Junior Member

Posts: 2
Threads: 1
Joined: Jun 2020
Reputation: 0
#3
RE: Switch expressions must be integral numbers

(07-02-2020, 10:59 AM)TiManGames Wrote: 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/co...t_tutorial

ok, thanks
07-02-2020, 12:20 PM
Find




Users browsing this thread: 1 Guest(s)