IsVehicleoccupied + question - 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: IsVehicleoccupied + question (
/showthread.php?tid=446141)
IsVehicleoccupied + question -
Lisaax - 24.06.2013
I've got this errors
C:\Documents and Settings\Lisa\Bureaublad\SAMP Servers\NQRP3Reported.pwn(2273) : error 017: undefined symbol "foreach"
C:\Documents and Settings\Lisa\Bureaublad\SAMP Servers\NQRP3Reported.pwn(2273) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Lisa\Bureaublad\SAMP Servers\NQRP3Reported.pwn(2273) : error 017: undefined symbol "Player"
C:\Documents and Settings\Lisa\Bureaublad\SAMP Servers\NQRP3Reported.pwn(2273) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Line :
Код:
stock IsVehicleOccupied(iVehicleID, iSeatID = 0) {
foreach(new x: Player) if(GetPlayerVehicleID(x) == iVehicleID && GetPlayerVehicleSeat(x) == iSeatID) {
return 1;
}
return 0;
}
When i do #define foreach and #define Player i've get this errors
Код:
C:\Documents and Settings\Lisa\Bureaublad\SAMP Servers\NQRP3Reported.pwn(36) : warning 201: redefinition of constant/macro (symbol "foreach")
C:\Documents and Settings\Lisa\Bureaublad\SAMP Servers\NQRP3Reported.pwn(2275) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Lisa\Bureaublad\SAMP Servers\NQRP3Reported.pwn(2275) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Lisa\Bureaublad\SAMP Servers\NQRP3Reported.pwn(2275) : warning 215: expression has no effect
C:\Documents and Settings\Lisa\Bureaublad\SAMP Servers\NQRP3Reported.pwn(2275) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\Lisa\Bureaublad\SAMP Servers\NQRP3Reported.pwn(2275) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
2nd question: how can i disable that the car's wont despawn when you get out of the car ( LSPD cars etc)
3rd qustion: how can i put a checkpoint if i contract you and if i do /givemehit the hit wont go away.
Re: IsVehicleoccupied + question -
Jstylezzz - 24.06.2013
1st answer: You're taking the error too literally. Foreach is a include, you need to download the foreach include and #include <foreach> somewhere after #include <a_samp>.
2nd answer: This is probably a timer in your script that respawns the cars as soon as you get out of it.
3rd answer: Check some tutorials on creating checkpoints, creating commands, and so on. I think the things (information) you'll need are about sscanf, a command processor and checkpoints.
Re: IsVehicleoccupied + question -
RenSoprano - 24.06.2013
Quote:
Originally Posted by Jstylezzz
1st answer: You're taking the error too literally. Foreach is a include, you need to download the foreach include and #include <foreach> somewhere after #include <a_samp>.
2nd answer: This is probably a timer in your script that respawns the cars as soon as you get out of it.
3rd answer: Check some tutorials on creating checkpoints, creating commands, and so on. I think the things (information) you'll need are about sscanf, a command processor and checkpoints.
|
Good explained. But if you have a little knowedges.