Stupid 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: Stupid errors (
/showthread.php?tid=393296)
Stupid errors -
Elysian` - 17.11.2012
pawn Код:
forward message();
public message()
{
SendClientMessage(playerid, COLOR_YELLOW, "We've arrived at the Airport, collect your belongings and have a nice day!");
SetPlayerPos(playerid, -1357.2334,1.2626,6.0000,271.6296);
SetPlayerInterior(playerid, 0);
return 1;
}
Код:
error 017: undefined symbol "playerid"
error 017: undefined symbol "playerid"
error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
Re: Stupid errors -
Konstantinos - 17.11.2012
Use a for loop inside the callback. Last, replace 'playerid' with the variable you'll make.
pawn Код:
forward message();
public message()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
SendClientMessage(i, COLOR_YELLOW, "We've arrived at the Airport, collect your belongings and have a nice day!");
SetPlayerPos(i, -1357.2334,1.2626,6.0000,271.6296);
SetPlayerInterior(i, 0);
}
return 1;
}
Re: Stupid errors -
park4bmx - 17.11.2012
Just make the public to pass a variable
pawn Код:
forward Message(playerid)
public Message(playerid)
//so on....