Returning string.
#2

pawn Код:
stock GetNumberName(number) {
    new n[64];
    switch(number) {
        case 0: strcat(n, "zero");
        case 1: strcat(n, "one");
        case 2: strcat(n, "two");
        default: strcat(n, "invalid");
    }
    return n;
}
Do it like that.
Reply


Messages In This Thread
Returning string. - by Roko_foko - 15.07.2011, 13:14
Re: Returning string. - by jameskmonger - 15.07.2011, 13:21
Re: Returning string. - by CyNiC - 15.07.2011, 13:23
Re: Returning string. - by Roko_foko - 15.07.2011, 13:25
Re: Returning string. - by jameskmonger - 15.07.2011, 13:26
Re: Returning string. - by [MG]Dimi - 15.07.2011, 13:27
Re: Returning string. - by Shadoww5 - 15.07.2011, 13:32
Re: Returning string. - by Roko_foko - 15.07.2011, 13:56
Re: Returning string. - by Shadoww5 - 15.07.2011, 14:06
Re: Returning string. - by jameskmonger - 15.07.2011, 16:05

Forum Jump:


Users browsing this thread: 2 Guest(s)