NF-RP.pwn(881) : error 010: invalid function or declaration
#1

PHP код:
stock GetBusinessNameFromType(type)
{
    new 
businessName[70];
    switch(
type)
    {
        case 
format(businessNamesizeof(BusinessName), "24/7");
        case 
format(businessNamesizeof(BusinessName), "Binco");
        case 
format(businessNamesizeof(BusinessName), "Bar");
        case 
format(businessNamesizeof(BusinessName), "Gym");
        case 
format(businessNamesizeof(BusinessName), "Burger");
        case 
format(businessNamesizeof(BusinessName), "Pizzeria");
        case 
format(businessNamesizeof(BusinessName), "Ammunation");
    }
    
    return 
businessName;

Why this error : NF-RP.pwn(881) : error 010: invalid function or declaration
line return businessName;
Reply
#2

Try:
pawn Код:
stock GetBusinessNameFromType(type)
{
    new businessName[70];
    switch(type)
    {
        case 0 : format(businessName, sizeof(businessName), "24/7");
        case 1 : format(businessName, sizeof(businessName), "Binco");
        case 2 : format(businessName, sizeof(businessName), "Bar");
        case 3 : format(businessName, sizeof(businessName), "Gym");
        case 4 : format(businessName, sizeof(businessName), "Burger");
        case 5 : format(businessName, sizeof(businessName), "Pizzeria");
        case 6 : format(businessName, sizeof(businessName), "Ammunation");
    }

    return businessName;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)