Error Forever
#1

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;
}
Reply
#2

Anyone?
Reply
#3

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
{
Reply
#4

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 -_-
Reply
#5

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.
Reply
#6

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).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)