public OnPlayerEnterCheckpoint(playerid) { CheckpointCheck(playerid); if(cpid == CPS1) { GameTextForPlayer(playerid,"ohai",1000,4); GivePlayerMoney(playerid, 1000); TogglePlayerCheckpoint(playerid, CPS1, bool:0); } return 1; } |
Originally Posted by 0ne
maybe cause there isn't anything that defines cpid?
|
public OnPlayerEnterStreamedCheckpoint(playerid, streamid) { new cpid = CheckpointCheck(playerid); if (cpid == CPS1) { GameTextForPlayer(playerid,"~w~you earned ~r~$1000~w~.",1000,4); GivePlayerMoney(playerid, 1000); TogglePlayerCheckpoint(playerid, CPS1, bool:0); } return 1; } |
\pawno\include\cps.inc(140) : warning 208: function with tag result used before definition, forcing reparse \humanvszombies\zm.pwn(291) : warning 219: local variable "cpid" shadows a variable at a preceding level \humanvszombies\zm.pwn(291) : error 029: invalid expression, assumed zero \humanvszombies\zm.pwn(291) : error 029: invalid expression, assumed zero \humanvszombies\zm.pwn(293) : warning 225: unreachable code \humanvszombies\zm.pwn(293) : warning 213: tag mismatch \humanvszombies\zm.pwn(291) : warning 204: symbol is assigned a value that is never used: "cpid" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. |
new cpid;
if(CPS1 == true)
} public OnPlayerEnterStreamedCheckpoint(playerid, streamid) { CheckpointCheck(playerid); if (cpid == CPS1) { GameTextForPlayer(playerid,"~w~you earned ~r~$1000~w~.",1000,4); GivePlayerMoney(playerid, 1000); TogglePlayerCheckpoint(playerid, CPS1, bool:0); } return 1; } |
C:\Users\Robin\samp03asvr_R7_win32\pawno\include\c ps.inc(140) : warning 208: function with tag result used before definition, forcing reparse \zm.pwn(294) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Warnings. |
Originally Posted by Killa_
Show us the variables: cpid and CPS1, make sures they are not a float or bool.
|
} new CPS1; public OnGameModeInit() { |
Originally Posted by OnGameModeInit
CPS1 = CreateCheckpoint(1,2217.381103,-1146.940917,1025.796875, 3.0, 20);
|
public OnGameModeExit() { DestroyCheckpoint(CPS1); } |