SA-MP Forums Archive
Error Forever - 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: Error Forever (/showthread.php?tid=523236)



Error Forever - Kaaashi - 01.07.2014

C:\Users\Administrator\Desktop\King Generation Roleplay\gamemodes\PRRP.pwn(4702) : error 001: expected token: ";", but found "{"
C:\Users\Administrator\Desktop\King Generation Roleplay\gamemodes\PRRP.pwn(4709) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Код:
stock ResetPlayerInfo
4702{
	fSweeperPos[playerid][0] = 0;
	fSweeperPos[playerid][1] = 0;
	fSweeperPos[playerid][2] = 0;
	PlayerSweeping[playerid] = 0;
	SweeperTime[playerid] = 0;
	SweeperDistance[playerid] = 0;
	return 1;
}



Re: Error Forever - Kaaashi - 01.07.2014

Anyone?


Re: Error Forever - BlackSirrah239 - 01.07.2014

Quote:
Originally Posted by Kaaashi
Посмотреть сообщение
C:\Users\Administrator\Desktop\King Generation Roleplay\gamemodes\PRRP.pwn(4702) : error 001: expected token: ";", but found "{"
C:\Users\Administrator\Desktop\King Generation Roleplay\gamemodes\PRRP.pwn(4709) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Код:
stock ResetPlayerInfo
4702{
	fSweeperPos[playerid][0] = 0;
	fSweeperPos[playerid][1] = 0;
	fSweeperPos[playerid][2] = 0;
	PlayerSweeping[playerid] = 0;
	SweeperTime[playerid] = 0;
	SweeperDistance[playerid] = 0;
	return 1;
}
Why do you have
Код:
stock ResetPlayerInfo
4702{
Change it to (remove the 4702)
Код:
stock ResetPlayerInfo
{



Re: Error Forever - kamiliuxliuxliux - 01.07.2014

Quote:
Originally Posted by BlackSirrah239
Посмотреть сообщение
Why do you have
Код:
stock ResetPlayerInfo
4702{
Change it to (remove the 4702)
Код:
stock ResetPlayerInfo
{
He showed us the error line -_-


Re: Error Forever - Threshold - 01.07.2014

pawn Код:
stock ResetPlayerInfo(playerid)
{
    fSweeperPos[playerid][0] = 0;
    fSweeperPos[playerid][1] = 0;
    fSweeperPos[playerid][2] = 0;
    PlayerSweeping[playerid] = 0;
    SweeperTime[playerid] = 0;
    SweeperDistance[playerid] = 0;
    return 1;
}
You need to specify whether the function has parameters or not. If there are no parameters, you just need to place '()'.

EDIT: Below poster was right, you need a 'playerid' parameter.


Re: Error Forever - kamiliuxliuxliux - 01.07.2014

BTW: as I know stock function should have no params. (ResetPlayerInfo() {}) or more (ResetPlayerInfo(playerid.........) {})Well In this case in variable fSweeperPos you use playerid, so stock func. must be with the same parameter. Try stock ResetPlayerInfo(playerid).