Invalide code
#1

Код HTML:
error 002: only a single statement (or expression) can follow each "case"
Код HTML:
error 029: invalid expression, assumed zero
Код HTML:
error 008: must be a constant expression; assumed zero
Код HTML:
warning 215: expression has no effect
Код HTML:
warning 203: symbol is never used: "aumagasin1"
Код HTML:
error 010: invalid function or declaration
X2

Код HTML:
error 054: unmatched closing brace ("}")
Код HTML:
fatal error 107: too many error messages on one line

Код HTML:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    switch(pickupid)
    {
        switch aumagasin1:
        {
     		DestroyPickup(aumagasin1);
		    //CreatePickup(1239, 22, -1833.1565,62.1130,1055.1296, 14);
        }
        switch aumagasin2:
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "Vendeur dit: Bonjour, je peux vous aider ?");
     		DestroyPickup(aumagasin2);
    		toilette1 = CreatePickup(1318, 22, -1839.4929,54.2765,1055.1296);
        }
        switch toilette1:
        {
            DestroyPickup(toilette1);
            //CreatePickup(1318, 22, -1868.6196,46.2699,1055.1296) == frontiere
            frontiere = CreatePickup(1318, 22, -1868.6196,46.2699,1055.1296);
            //SetPlayerCheckpoint(playerid, -1868.6196,46.2699,1055.1296, 3.0);
        }
        switch frontiere:
        {
            SendClientMessage(playerid, 0xFF0000FF,"94 c'est barзa");
     		DestroyPickup(frontiere);
    		passe = CreatePickup(1318, 22, -1868.6437,41.6172,1055.1296);
        }
        switch passe:
        {
            SendClientMessage(playerid,0xFF0000FF,"Circuit du parkour reussi OKLM");
        }
    }
    return 1;
}
Reply
#2

https://sampwiki.blast.hk/wiki/Control_Structures
Reply
#3

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    switch(pickupid)
    {
        case aumagasin1:
        {
            DestroyPickup(aumagasin1);
            //CreatePickup(1239, 22, -1833.1565,62.1130,1055.1296, 14);
        }
        case aumagasin2:
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "Vendeur dit: Bonjour, je peux vous aider ?");
            DestroyPickup(aumagasin2);
            toilette1 = CreatePickup(1318, 22, -1839.4929,54.2765,1055.1296);
        }
        case toilette1:
        {
            DestroyPickup(toilette1);
            //CreatePickup(1318, 22, -1868.6196,46.2699,1055.1296) == frontiere
            frontiere = CreatePickup(1318, 22, -1868.6196,46.2699,1055.1296);
            //SetPlayerCheckpoint(playerid, -1868.6196,46.2699,1055.1296, 3.0);
        }
        case frontiere:
        {
            SendClientMessage(playerid, 0xFF0000FF,"94 c'est barзa");
            DestroyPickup(frontiere);
            passe = CreatePickup(1318, 22, -1868.6437,41.6172,1055.1296);
        }
        case passe:
        {
            SendClientMessage(playerid,0xFF0000FF,"Circuit du parkour reussi OKLM");
        }
    }
    return 1;
}
Reply
#4

error 008: must be a constant expression; assumed zero x5
Reply
#5

PHP код:
new var2;
switch(var){
    
    case 
var2: {}; //var2 != const
    
    
case 1: {};    //1 = const

Reply
#6

Case values must be constants: their values must be known at compile time. You must use if-statements in this case, regrettably.
Reply
#7

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
PHP код:
new var2;
switch(var){
    
    case 
var2: {}; //var2 != const
    
    
case 1: {};    //1 = const

Код HTML:
error 010: invalid function or declaration
X3

Код HTML:
warning 203: symbol is never used: "var2"
Reply
#8

This is an example hammer ~.~
Reply
#9

Ah okay but I understand nothing more
Reply
#10

UP pleases help me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)