Using const *[], len
#5

Quote:
Originally Posted by snoob
Quote:
Originally Posted by ilikepie2221
Well, now I have this:

pawn Код:
GetPlayerRankName(playerid,const rankz[],len)
{
  len = strlen(x)
  new x[20], rankz[len];
  if(whatever == 1) x = "Yay, you cool";
  // More ifs to define x
  rankz = x;
}

But I can't seem to get it. Can you give me an example, and I'll make it myself?
hi

i would do something similar to that
pawn Код:
GetPlayerRankName(playerid)//
{
 new rankz[20];
 if(whatever == 1) format(rankz,sizeof(rankz),"Yay, you cool");
 else if(whatever == 2) format(rankz,sizeof(rankz),"wow your 1337 !!!");
 // More ifs to define x
 print(rankz); // you can print rankz in server screen for shit and giggle
 return rankz;// you could return rankz this way you can do: new string[xxx]; string = GetPlayerRankName(playerid)
}
I can't do that for what I have in my script. I need to use "const string[], len".
Reply


Messages In This Thread
Using const *[], len - by ilikepie2221 - 06.09.2009, 20:00
Re: Using const *[], len - by dice7 - 06.09.2009, 20:02
Re: Using const *[], len - by ilikepie2221 - 07.09.2009, 00:17
Re: Using const *[], len - by snoob - 07.09.2009, 00:39
Re: Using const *[], len - by ilikepie2221 - 07.09.2009, 00:42
Re: Using const *[], len - by ilikepie2221 - 07.09.2009, 14:40

Forum Jump:


Users browsing this thread: 1 Guest(s)