[HELP] Errors ! - 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: [HELP] Errors ! (
/showthread.php?tid=512406)
[HELP] Errors ! -
Sky96 - 10.05.2014
Hello guys i started to make my TDM server from scratch lets say so here it is :
ERRORS AND WARNINGS :
Код:
C:\Users\Sky\Downloads\[CMX] CroMaxX TDM ©\pawno\[CMX]TDM.pwn(108 -- 109) : error 029: invalid expression, assumed zero
C:\Users\Sky\Downloads\[CMX] CroMaxX TDM ©\pawno\[CMX]TDM.pwn(114 -- 115) : error 029: invalid expression, assumed zero
C:\Users\Sky\Downloads\[CMX] CroMaxX TDM ©\pawno\[CMX]TDM.pwn(117) : warning 202: number of arguments does not match definition
C:\Users\Sky\Downloads\[CMX] CroMaxX TDM ©\pawno\[CMX]TDM.pwn(120 -- 121) : error 029: invalid expression, assumed zero
C:\Users\Sky\Downloads\[CMX] CroMaxX TDM ©\pawno\[CMX]TDM.pwn(123) : warning 202: number of arguments does not match definition
C:\Users\Sky\Downloads\[CMX] CroMaxX TDM ©\pawno\[CMX]TDM.pwn(126 -- 127) : error 029: invalid expression, assumed zero
C:\Users\Sky\Downloads\[CMX] CroMaxX TDM ©\pawno\[CMX]TDM.pwn(129) : warning 202: number of arguments does not match definition
C:\Users\Sky\Downloads\[CMX] CroMaxX TDM ©\pawno\[CMX]TDM.pwn(132) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
So here is the code :
Код:
public OnPlayerRequestClass(playerid, classid) <== 100 (line )
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
switch(classid)
{
case 0
{
SetPlayerTeam(playerid, TEAM_ARMY);
GameTextForPlayer(playerid, "~b~ARMY", 1000, 3);
}
case 1
{
SetPlayerTeam(playerid, TEAM_TERRORIST);
GameTextForPlayer(playerid, "~r~TERRORIST, 1000", 3);
}
case 2
{
SetPlayerTeam(playerid, TEAM_FBI);
GameTextForPlayer(playerid, "~b~FBI, 1000", 3);
}
case 3
{
SetPlayerTeam(playerid, TEAM_MAFIA);
GameTextForPlayer(playerid, "~r~MAFIA, 1000", 3);
}
}
return 1;
} <== 133 (line)
So plz help me !
Re: [HELP] Errors ! -
Konstantinos - 10.05.2014
You didn't close the string correctly. Change to:
pawn Код:
GameTextForPlayer(playerid, "~r~TERRORIST", 1000, 3);
// AND:
GameTextForPlayer(playerid, "~b~FBI", 1000, 3);
// AND:
GameTextForPlayer(playerid, "~r~MAFIA", 1000, 3);
EDIT: I posted the lines which caused the errors and I told you the problem, I didn't fix them. Anyways, I edited the posted with the correct one.
Re: [HELP] Errors ! -
Nahin - 10.05.2014
Add " after every 1000.
Re: [HELP] Errors ! -
Sky96 - 10.05.2014
I do that then i got this
Код:
C:\Users\Sky\Downloads\[CMX] CroMaxX TDM ©\pawno\[CMX]TDM.pwn(107 -- 108) : error 029: invalid expression, assumed zero
C:\Users\Sky\Downloads\[CMX] CroMaxX TDM ©\pawno\[CMX]TDM.pwn(113 -- 114) : error 029: invalid expression, assumed zero
C:\Users\Sky\Downloads\[CMX] CroMaxX TDM ©\pawno\[CMX]TDM.pwn(116) : error 037: invalid string (possibly non-terminated string)
C:\Users\Sky\Downloads\[CMX] CroMaxX TDM ©\pawno\[CMX]TDM.pwn(116) : warning 215: expression has no effect
C:\Users\SkyDownloads\[CMX] CroMaxX TDM ©\pawno\[CMX]TDM.pwn(116) : warning 215: expression has no effect
C:\Users\Sky\Downloads\[CMX] CroMaxX TDM ©\pawno\[CMX]TDM.pwn(116) : error 001: expected token: ";", but found ")"
C:\Users\Sky\Downloads\[CMX] CroMaxX TDM ©\pawno\[CMX]TDM.pwn(116) : error 029: invalid expression, assumed zero
C:\Users\Sky\Downloads\[CMX] CroMaxX TDM ©\pawno\[CMX]TDM.pwn(116) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
6 Errors.