27.06.2014, 16:10
Hi guys. i have a big problem ( i think so )
when i compile, it says
C:\Users\Cristi\Desktop\server\gamemodes\gm.pwn(10 49) : warning 209: function "cmd_takejob" should return a value
C:\Users\Cristi\Desktop\server\gamemodes\gm.pwn(10 50) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Line 1049: }
line 1050: return 1;
pls help
pawn Код:
CMD:takejob(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1030.9374,-1442.4918,13.5546))
{
if(PlayerInfo[playerid][pJob] == 0)
{
SendClientMessage(playerid,COLOR_AQUA, "***Felicitari!*** Acum ai jobul Deliver.***");
SendClientMessage(playerid,COLOR_AQUA, "***Comenzile jobului: /work, /quitjob.***");
PlayerInfo[playerid][pJob] = 1;
}
else
{
SendClientMessage(playerid,0x6A6A6AFF, "Ai deja un job. Foloseste /quitjob intai.");
return 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2093.7031,-2032.5769,13.5469))
{
if(PlayerInfo[playerid][pJob] < 1)
{
SendClientMessage(playerid, COLOR_AQUA, "***Felicitari! Acum ai jobul Garbage Man.**");
SendClientMessage(playerid, COLOR_AQUA, "***Comenzile jobuli: /garbage, /quitjob.**");
PlayerInfo[playerid][pJob] = 2;
}
else
{
SendClientMessage(playerid, 0x6A6A6AFF, "Ai deja un job. Foloseste /quitjob intai.");
return 1;
}
}
else
{
SendClientMessage(playerid, 0x6A6A6AFF, "Nu poti lua jobul de aici.");
return 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, -401.3627,-1419.2340,25.7209))
{
if(PlayerInfo[playerid][pJob] < 1)
{
SendClientMessage(playerid, COLOR_AQUA, "***Felicitari! Acum ai jobul Fermier.**");
SendClientMessage(playerid, COLOR_AQUA, "***Comenzile jobuli: /recolteaza, /quitjob.**");
PlayerInfo[playerid][pJob] = 3;
}
else
{
SendClientMessage(playerid, 0x6A6A6AFF, "Ai deja un job. Foloseste /quitjob intai.");
return 1;
}
}
else
{
SendClientMessage(playerid, 0x6A6A6AFF, "Nu poti lua jobul de aici.");
return 1;
}
}
return 1;
}
C:\Users\Cristi\Desktop\server\gamemodes\gm.pwn(10 49) : warning 209: function "cmd_takejob" should return a value
C:\Users\Cristi\Desktop\server\gamemodes\gm.pwn(10 50) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Line 1049: }
line 1050: return 1;
pls help