[+4 REP] Duel Feature
#1

Hello !

i got a wired Error while compling !!!

PHP код:
D:\pawno-master\include\SAPData/Gameplay/Duel.pwn(694) : error 008must be a constant expressionassumed zero
D
:\pawno-master\include\SAPData/Gameplay/Duel.pwn(698) : error 008must be a constant expressionassumed zero
D
:\pawno-master\include\SAPData/Gameplay/Duel.pwn(702) : error 008must be a constant expressionassumed zero
D
:\pawno-master\include\SAPData/Gameplay/Duel.pwn(706) : error 008must be a constant expressionassumed zero
San Andreas Playground Pawn compiler 1.2          Copyright 
(c2015-2016ITB CompuPhaseSAPlayground
4 Errors

What the hell that means ^^^^ ?

about the code he is here

PHP код:
CMD:declineduel(playeridparams[])
{
    
SendClientMessage(playeridCOLOR_RED"You decline the duel inventation");
    
SendClientMessage(Inventation[playerid], COLOR_RED"your duel inventation got declined.");
    
Inventation[InventationSent[playerid]] = -1;
    
InventationSent[playerid] = -1;
    switch(
playerid)
    {
        case 
DualRoom1:
        {
            
DualRoom1 = -1;
        }
        case 
DualRoom2:
        {
            
DualRoom2 = -1;
        }
        case 
DualRoom3:
        {
            
DualRoom3 = -1;
        }
        case 
DualRoom4:
        {
            
DualRoom4 = -1;
        }
    }
    return 
1;

Definition :

new DualRoom1,
DualRoom2,
.....
DualRoom4
;


Thanks in advence
Reply
#2

Use if, else if statements.
Actually I don't know what the hell you are trying to do with this switch statement.
Reply
#3

else if statements can't be used on case function
Reply
#4

Remove the whole switch and use if statements, That's what i meant ...
Reply
#5

Please The code idk how to switch from (switch ) to normal thing
Reply
#6

FIXED !
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)