having some questions...
#3

Lol that's wrong. Return means the end of a callback or function. the number beside it determines what value the function or callback will give when it's used.

For example:
pawn Код:
ExampleFunction(playerid)
{
  if(playerid==stupid)return 1;
  if(playerid==bacon)return 5;
  return 0;
}

//someplace else
if(ExampleFunction(24)) // This can equal 1, 5, or 0 depending on what it returns
{
SendClientMessage(playerid,0xFF0000FF,"You suck!");
}else{
SendClientMessage(playerid,0xFF0000FF,"I'm indifferent towards you!");
}
Hope that helps
Reply


Messages In This Thread
having some questions... - by agusfn20 - 27.07.2009, 02:59
Re: having some questions... - by [DD]FlameOFDeath - 27.07.2009, 03:02
Re: having some questions... - by Joe Staff - 27.07.2009, 04:50

Forum Jump:


Users browsing this thread: 1 Guest(s)