I need help (+REP for help) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I need help (+REP for help) (
/showthread.php?tid=611444)
I need help (+REP for help) -
MarkNelson - 06.07.2016
Hi i tried to fix this warning but i can't.
so i'm here to post a topic requesting for help
Код:
C:\Users\infogenie\Desktop\Zombies VS Humans V1.1\gamemodes\own.pwn(942) : warning 209: function "OnPlayerEnterCheckpoint" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
here is the line :
Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(onCheck[playerid])
{
GivePlayerMoney(playerid,5000);
DisablePlayerCheckpoint(playerid);
onCheck[playerid] = false;
SetPlayerPos(playerid,2024.8163,1344.3187,10.8203);
SetPlayerFacingAngle(playerid,10.8203);
SetPlayerColor(playerid,GREEN);
return 1;
}
}
line 941 is the last "}" of the lines
Re: I need help (+REP for help) -
Eymeric69 - 06.07.2016
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
if(onCheck[playerid])
{
GivePlayerMoney(playerid,5000);
DisablePlayerCheckpoint(playerid);
onCheck[playerid] = false;
SetPlayerPos(playerid,2024.8163,1344.3187,10.8203);
SetPlayerFacingAngle(playerid,10.8203);
SetPlayerColor(playerid,GREEN);
return 1;
}
return 1;
}
test that
Re: I need help (+REP for help) -
Mencent - 06.07.2016
Hello!
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
if(onCheck[playerid])
{
GivePlayerMoney(playerid,5000);
DisablePlayerCheckpoint(playerid);
onCheck[playerid] = false;
SetPlayerPos(playerid,2024.8163,1344.3187,10.8203);
SetPlayerFacingAngle(playerid,10.8203);
SetPlayerColor(playerid,GREEN);
return 1;
}
return 1;
}
A callback must return a value (mostly the value is 1).
Re: I need help (+REP for help) -
F1N4L - 06.07.2016
Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(onCheck[playerid])
{
GivePlayerMoney(playerid,5000);
DisablePlayerCheckpoint(playerid);
onCheck[playerid] = false;
SetPlayerPos(playerid,2024.8163,1344.3187,10.8203);
SetPlayerFacingAngle(playerid,10.8203);
SetPlayerColor(playerid,GREEN);
}
return 1;
}
Re: I need help (+REP for help) -
gurmani11 - 06.07.2016
Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(onCheck[playerid])
{
GivePlayerMoney(playerid,5000);
DisablePlayerCheckpoint(playerid);
onCheck[playerid] = false;
SetPlayerPos(playerid,2024.8163,1344.3187,10.8203);
SetPlayerFacingAngle(playerid,10.8203);
SetPlayerColor(playerid,GREEN);
}
return 1; // swapped it from braces to here
}
Re: I need help (+REP for help) -
MarkNelson - 06.07.2016
thanks all it's fixed. let me give you the reputations
oh shit i gave one last 24 hours. don't worry i will add all of you as friends then give you the reputations