SA-MP Forum
November 21, 2009, 12:22:48 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Hosted tab listings available from serverFFS
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Need help fixing error error  (Read 34 times)
Jose_510
Huge Clucker
***
Posts: 319



View Profile WWW
« on: November 03, 2009, 01:43:17 pm »

Code:
(3989) : warning 209: function "SetPlayerFightStyle" should return a value
(3990) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

Code:
public SetPlayerFightStyle(playerid)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pFightStyle] == 1)//Kick_Boxinng
{
   SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
}
else if(PlayerInfo[playerid][pFightStyle] == 2)//Kung_Fu
{
   SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
}
else if(PlayerInfo[playerid][pFightStyle] == 3)//Boxing
{
   SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
}
else if(PlayerInfo[playerid][pFightStyle] == 4)//Street_Fight
{
   SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
}
}
}     <----line 3389
return 1;     <----line 3390
}
« Last Edit: November 03, 2009, 01:48:10 pm by Jose_510 » Logged

hi. Is that possabole to put the Chat on the Homepage? Like that pebole on the Site can chat with pebole in the Game?
..
..
Stupit? No if somone say somthang is stupit he/her are self stupit. I mean so pebole on the site can chat with the Pebole in the game.
..
..
Is there any IRC Boot to do it?
Pebole we got to help him with the IRC boot so that somone dont say somthang stupit

God I love Non-English speakers

Advertisements: http://forum.sa-mp.com/index.php?topic=120044.msg738494#msg738494
Alice[A11]
Little Clucker
*
Posts: 42


View Profile
« Reply #1 on: November 03, 2009, 01:49:41 pm »

Code:
public SetPlayerFightStyle(playerid)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pFightStyle] == 1)//Kick_Boxinng
{
   SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
   return 1;
}
else if(PlayerInfo[playerid][pFightStyle] == 2)//Kung_Fu
{
   SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
   return 1;
}
else if(PlayerInfo[playerid][pFightStyle] == 3)//Boxing
{
   SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
   return 1;
}
else if(PlayerInfo[playerid][pFightStyle] == 4)//Street_Fight
{
   SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
   return 1;
}
//           }                       delete this ligne
}
return 1;
}
« Last Edit: November 03, 2009, 01:52:34 pm by Alice[A11] » Logged
Jose_510
Huge Clucker
***
Posts: 319



View Profile WWW
« Reply #2 on: November 03, 2009, 02:06:39 pm »

Ok, I some of it so now it looks like this. I haven't tested this and got no warnings, but will it work?

Code:
public SetPlayerFightStyle(playerid)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pFightStyle] == 1)//Kick_Boxinng
{
  SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
}
else if(PlayerInfo[playerid][pFightStyle] == 2)//Kung_Fu
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
}
else if(PlayerInfo[playerid][pFightStyle] == 3)//Boxing
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
}
else if(PlayerInfo[playerid][pFightStyle] == 4)//Street_Fight
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
}
}
return 1;
}
Logged

hi. Is that possabole to put the Chat on the Homepage? Like that pebole on the Site can chat with pebole in the Game?
..
..
Stupit? No if somone say somthang is stupit he/her are self stupit. I mean so pebole on the site can chat with the Pebole in the game.
..
..
Is there any IRC Boot to do it?
Pebole we got to help him with the IRC boot so that somone dont say somthang stupit

God I love Non-English speakers

Advertisements: http://forum.sa-mp.com/index.php?topic=120044.msg738494#msg738494
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF one | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!