[SAP] OPEN ME !
#1

Hey !

Errors :

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(697) : error 008must be a constant expressionassumed zero
D
:\pawno-master\include\SAPData/Gameplay/Duel.pwn(700) : error 008must be a constant expressionassumed zero
D
:\pawno-master\include\SAPData/Gameplay/Duel.pwn(703) : error 008must be a constant expressionassumed zero 
Code:

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: <-- 694
        DualRoom1 
= -1;
        
        case 
DualRoom2: <-- 697
        DualRoom2 
= -1;
        
        case 
DualRoom3: <-- 700
        DualRoom3 
= -1;
        
        case 
DualRoom4: <-- 703
        DualRoom4 
= -1;
        
    }
    return 
1;

Thanks
Yaa
Reply
#2

Код:
case DualRoom1: <-- 694
Is the <-- 694 part of that supposed to be a comment or what?

I suspect if you remove that part and the three other ones below it, it'll compile.
Reply
#3

wtf i added this comments <-- *** for define the lines :/

the origine code without it
Reply
#4

Where does playerid = DualRoom1/2/3/4 is define ?
Reply
#5

My guess "DualRoom" are variables and as the error says, switch statements cannot have varying cases. You can compare non-constant variables using if-else.

Or if those variables hold constant values, use #define or enum.
Reply
#6

new DualRoom1; <--
new DualRoom2; <--
new DualRoom3; <--
new DualRoom4; <--

Defines ^^
Reply
#7

switch(playerid)
{
case DualRoom1: <-- 694
DualRoom1 = -1;

case DualRoom2: <-- 697
DualRoom2 = -1;

case DualRoom3: <-- 700
DualRoom3 = -1;

case DualRoom4: <-- 703
DualRoom4 = -1;

}

This script says if( playerid= DualRoom1){DualRoom1=-1} etc. So to work you need to make a playerid = DualRoom1/2/3/4
Reply
#8

what do you mean ?

and just a notice i got this error after updating YSI To lastest version
Reply
#9

REMOVED
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)