Help me with the tutorial please
#1

if(TutTime[i] >= 1)
{
TutTime[i] += 1;
if(TutTime[i] == 5)
{
SetPlayerInterior(playerid,5);
SetPlayerPos(playerid,323.4,305.6,999.1);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraPos(playerid,323.4-1.5-1.0,305.6,999.1+0.7);
SetPlayerCameraLookAt(playerid,323.4-1.0,305.6,999.1+0.7);
SendClientMessage(i, COLOR_GREEN, "[---------------------------------------------------------------------------------------------]");
SendClientMessage(i, COLOR_WHITE, " ");
SendClientMessage(i, COLOR_YELLOW2, "Bienvenido a NewLife Roleplay (NL-RP), como verбs, el nombre indica que es un servidor de roleplay.");
SendClientMessage(i, COLOR_YELLOW2, "Roleplay significa que debes imitar todo lo que hagas tъ y tu personaje como en la vida real.");
SendClientMessage(i, COLOR_YELLOW2, "Si no sabes rolear, en el foro, www.nl-rp.foroactivo.es, podrбs encontrar guнas y mбs cosas");
SendClientMessage(i, COLOR_YELLOW2, "de utilidad. Ademбs, usarlo es muy importante porque te facilitarб hacer diversas acciones");
SendClientMessage(i, COLOR_YELLOW2, "como entrar en facciones como la Policнa Nacional, Mйdicos, y bandas/mafias.");
SendClientMessage(i, COLOR_WHITE, "Tambiйn es muy importante que tengas el TeamSpeak 2, por йl podrбs comunicarte con los que");
SendClientMessage(i, COLOR_WHITE, "estбn jugando en el servidor, administradores y compaсeros de equipo.");
SendClientMessage(i, COLOR_WHITE, " ");
SendClientMessage(i, COLOR_GREEN, "[---------------------------------------------------------------------------------------------]");
}

What's is bad? Sorry for my english xD

C:\Documents and Settings\Usuario\Mis documentos\NL-RP\pawno\LU.pwn(5047) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Usuario\Mis documentos\NL-RP\pawno\LU.pwn(504 : error 017: undefined symbol "playerid"
C:\Documents and Settings\Usuario\Mis documentos\NL-RP\pawno\LU.pwn(5049) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Usuario\Mis documentos\NL-RP\pawno\LU.pwn(5050) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Usuario\Mis documentos\NL-RP\pawno\LU.pwn(5051) : error 017: undefined symbol "playerid"
Reply
#2

Loop it.
Reply
#3

1. You are using loop in this part, probably
pawn Код:
for(new i=0;i<MAX_PLAYERS;i++)
So playerid couldn't be found because playerid is used to be as "i"
just change
pawn Код:
SetPlayerInterior(playerid,5);
  SetPlayerPos(playerid,323.4,305.6,999.1);
  SetPlayerFacingAngle(playerid, 90.0);
  SetPlayerCameraPos(playerid,323.4-1.5-1.0,305.6,999.1+0.7);
  SetPlayerCameraLookAt(playerid,323.4-1.0,305.6,999.1+0.7);
To
pawn Код:
SetPlayerInterior(i,5);
  SetPlayerPos(i,323.4,305.6,999.1);
  SetPlayerFacingAngle(i, 90.0);
  SetPlayerCameraPos(i,323.4-1.5-1.0,305.6,999.1+0.7);
  SetPlayerCameraLookAt(i,323.4-1.0,305.6,999.1+0.7);
2. Things that related to GF must be in the GF topic.
Reply
#4

Quote:
Originally Posted by MenaceX^
1. You are using loop in this part, probably
pawn Код:
for(new i=0;i<MAX_PLAYERS;i++)
So playerid couldn't be found because playerid is used to be as "i"
just change
pawn Код:
SetPlayerInterior(playerid,5);
  SetPlayerPos(playerid,323.4,305.6,999.1);
  SetPlayerFacingAngle(playerid, 90.0);
  SetPlayerCameraPos(playerid,323.4-1.5-1.0,305.6,999.1+0.7);
  SetPlayerCameraLookAt(playerid,323.4-1.0,305.6,999.1+0.7);
To
pawn Код:
SetPlayerInterior(i,5);
  SetPlayerPos(i,323.4,305.6,999.1);
  SetPlayerFacingAngle(i, 90.0);
  SetPlayerCameraPos(i,323.4-1.5-1.0,305.6,999.1+0.7);
  SetPlayerCameraLookAt(i,323.4-1.0,305.6,999.1+0.7);
2. Things that related to GF must be in the GF topic.
Thanks you, its very good and work, but the pawno gives me some warnigs,:

C:\Documents and Settings\Usuario\Mis documentos\NL-RP\pawno\LU.pwn(5050) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Documents and Settings\Usuario\Mis documentos\NL-RP\pawno\LU.pwn(5067) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Documents and Settings\Usuario\Mis documentos\NL-RP\pawno\LU.pwn(5082) : warning 219: local variable "i" shadows a variable at a preceding level
Reply
#5

replace this
Код:
for(new i=0;i<MAX_PLAYERS;i++)
with this

pawn Код:
for(new x; x < GetMaxPlayers(); x++)
************************************************** *

And of all i , replace with x

e.g.
pawn Код:
Kick(i); /* should be */ Kick(x);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)