Many errors on one line? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Many errors on one line? (
/showthread.php?tid=209809)
Many errors on one line? -
Spiral - 11.01.2011
Hey folks, simple again:
pawn Код:
public DoorOpened()
{
new DoorOpened[MAX_PLAYERS];
DoorOpened(playerid) == 0;
return 1;
}
Thats the function which is called when the timer named DoorOpened ends, it gives me such errors on the DoorOpened(playerid) == 0; line:
Код:
error 012: invalid function call, not a valid address
error 017: undefined symbol "playerid"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Any help? Im so stupid.
Re: Many errors on one line? -
randomkid88 - 11.01.2011
You should define your function as
pawn Код:
public DoorOpened(playerid)
Then wherever you want to have this change for someone, use
Re: Many errors on one line? -
Spiral - 11.01.2011
okay, now I get this:
pawn Код:
(4003) : error 025: function heading differs from prototype
(4005) : warning 219: local variable "DoorOpened" shadows a variable at a preceding level
(4006) : error 012: invalid function call, not a valid address
(4006) : warning 215: expression has no effect
(4006) : error 001: expected token: ";", but found ")"
(4006) : error 029: invalid expression, assumed zero
(4006) : fatal error 107: too many error messages on one line
Read it like the first line of my code is line 4003 and the last line is 4008 ( Including the braces ) Now what?
Re: Many errors on one line? -
Dainyzxz - 11.01.2011
forward DoorOpened(playerid);
AW: Re: Many errors on one line? -
Nero_3D - 11.01.2011
Quote:
Originally Posted by Spiral
okay, now I get this:
pawn Код:
(4003) : error 025: function heading differs from prototype (4005) : warning 219: local variable "DoorOpened" shadows a variable at a preceding level (4006) : error 012: invalid function call, not a valid address (4006) : warning 215: expression has no effect (4006) : error 001: expected token: ";", but found ")" (4006) : error 029: invalid expression, assumed zero (4006) : fatal error 107: too many error messages on one line
Read it like the first line of my code is line 4003 and the last line is 4008 ( Including the braces ) Now what?
|
1. error: You already forwarded your function with a different header
Solution: Change the header of the forward and the public so they match
1. warning: You already created a variable called DoorOpened
Solution: Remove the one in the warning line
And in line 4006, change the brackets '('')' to this brackets '['']' and remove one equal sign