Error 047 on a return statement?!
#1

I am getting the following error:
error 047: array sizes do not match, or destination array is too small
At this:
pawn Код:
new rankname[100];
    rankname = ranks[strval(rank)];
    return rankname;
(note: also tried as this:
pawn Код:
new rankname[50];
    format(rankname, sizeof(rankname), "%s", ranks[strval(rank)]);
    return rankname;
and since then changed the array sizes because they were too large..)

Ranks being defined as such:
pawn Код:
new ranks[8][100] = { // note in above NOTE it is not 100 but 50
"New guy" // further results omitted
};
I tried in multiple ways but it still wont let me return the string.
Reply


Messages In This Thread
Error 047 on a return statement?! - by mamorunl - 08.09.2012, 13:55
Re: Error 047 on a return statement?! - by MP2 - 08.09.2012, 13:57
Re: Error 047 on a return statement?! - by mamorunl - 08.09.2012, 14:01
Re: Error 047 on a return statement?! - by HuSs3n - 08.09.2012, 14:03
Re: Error 047 on a return statement?! - by Guest3598475934857938411 - 08.09.2012, 14:38
Re: Error 047 on a return statement?! - by mamorunl - 08.09.2012, 14:57

Forum Jump:


Users browsing this thread: 1 Guest(s)