Raised This Month: $ Target: $400
 0% 

Issue with switch statement


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GoldNux
Senior Member
Join Date: Mar 2018
Old 11-12-2022 , 05:26   Issue with switch statement
Reply With Quote #1

Solved, I used the reserved keyword "enum". x)

I'm doing something wrong in this switch statement and I don't understand what it is.
If I remove this function code compiles as it should.

PHP Code:
public Printer(enum)
{
    switch (
enum)
    {
        case 
PRINT_T1WIN:
            
client_print(0print_center"TEAM ONE WON THE MATCH! ( %d|%d )"g_TeamOneScoreg_TeamTwoScore)
        case 
PRINT_T2WIN:
            
client_print(0print_center"TEAM TWO WON THE MATCH! ( %d|%d )"g_TeamTwoScoreg_TeamOneScore)
        case 
PRINT_DRAW:
            
client_print(0print_center"IT'S A DRAW!")
        case 
PRINT_ROUND:
            
client_print(0print_center"ROUND: %d/6"g_RoundCounter)
    }

PHP Code:
ERROR [1082]: invalid function or declaration // Function header line.
ERROR [1084]: invalid expressionassumed zero // Switch line 

Last edited by GoldNux; 11-12-2022 at 05:36.
GoldNux is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode