[Ajuda] Ajuda com Erros
#1

Galera eu uso a ppc_trucking e estou tentando por o texto vel.maximo "tanto" no radar porйm nгo estava conseguindo, pedi ajuda ao Don_Speed e ele disse para eu adicionar isso
Код:
format(stringr, sizeof(stringr), "Vel. Maxima %i Km/h", MaxSpeed);
    ACameras[CamID][CamText] = Create3DTextLabel(stringr, 0xFF0000FF, x, y, z+6.0, 100.0, 0, 0);
ao meu SetupSpeedCamera e ficou assim
Код:
SetupSpeedCamera(CamID, Float:x, Float:y, Float:z, Float:rot, MaxSpeed)
{
	// Store all the given values
    ACameras[CamID][CamX] = x;
    ACameras[CamID][CamY] = y;
    ACameras[CamID][CamZ] = z;
    ACameras[CamID][CamAngle] = rot;
    ACameras[CamID][CamSpeed] = MaxSpeed;
	// Create both camera objects and store their reference
    ACameras[CamID][CamObj1] = CreateObject(18880, x, y, z, 0.0, 0.0, rot);
    ACameras[CamID][CamObj2] = CreateObject(18880, x, y, z, 0.0, 0.0, rot + 180.0);
	format(stringr, sizeof(stringr), "Vel. Maxima %i Km/h", MaxSpeed);
    ACameras[CamID][CamText] = Create3DTextLabel(stringr, 0xFF0000FF, x, y, z+6.0, 100.0, 0, 0);
}
porйm deu esses erros :
Код:
C:\Users\Julio\Desktop\PPC_Trucking\pawno\include\PPC_Common.inc(266) : error 017: undefined symbol "stringr"
C:\Users\Julio\Desktop\PPC_Trucking\pawno\include\PPC_Common.inc(266) : error 017: undefined symbol "stringr"
C:\Users\Julio\Desktop\PPC_Trucking\pawno\include\PPC_Common.inc(266) : error 029: invalid expression, assumed zero
C:\Users\Julio\Desktop\PPC_Trucking\pawno\include\PPC_Common.inc(266) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Alguem pode me ajudar ? Linha 266 :
Код:
	format(stringr, sizeof(stringr), "Vel. Maxima %i Km/h", MaxSpeed);
Reply
#2

new stringr[256];

coloque em cima do codigo
Reply
#3

Quote:
Originally Posted by Dieguinho
Посмотреть сообщение
new stringr[256];

coloque em cima do codigo
Fiz isso e deu esse erro :
Код:
C:\Users\Julio\Desktop\PPC_Trucking\pawno\include\PPC_Common.inc(268) : error 017: undefined symbol "CamText"
C:\Users\Julio\Desktop\PPC_Trucking\pawno\include\PPC_Common.inc(268) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#4

new CamText;

e post a linha 268 pra tirar o warning
Reply
#5

Quote:
Originally Posted by Dieguinho
Посмотреть сообщение
new CamText;

e post a linha 268 pra tirar o warning
Agora foi na 269 olha aн
Код:
C:\Users\Julio\Desktop\PPC_Trucking\pawno\include\PPC_Common.inc(269) : warning 213: tag mismatch
C:\Users\Julio\Desktop\PPC_Trucking\pawno\include\PPC_Common.inc(269) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Linha 269:
Код:
    ACameras[CamID][CamText] = Create3DTextLabel(stringr, 0xFF0000FF, x, y, z+6.0, 100.0, 0, 0);
Reply
#6

Tentar assim nгo sei se ta certo

pawn Код:
ACameras[CamID] = Create3DTextLabel(stringr, 0xFF0000FF, x, y, z+6.0, 100.0, 0, 0);
Reply
#7

Quote:
Originally Posted by Dieguinho
Посмотреть сообщение
Tentar assim nгo sei se ta certo

pawn Код:
ACameras[CamID] = Create3DTextLabel(stringr, 0xFF0000FF, x, y, z+6.0, 100.0, 0, 0);
Agora deu apenas 1
Код:
C:\Users\Julio\Desktop\PPC_Trucking\pawno\include\PPC_Common.inc(269) : error 033: array must be indexed (variable "ACameras")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Na linha que vocк me passou:
Код:
	ACameras[CamID] = Create3DTextLabel(stringr, 0xFF0000FF, x, y, z+6.0, 100.0, 0, 0);
Reply
#8

Quote:
Originally Posted by Performancetotal
Посмотреть сообщение
Agora deu apenas 1
Код:
C:\Users\Julio\Desktop\PPC_Trucking\pawno\include\PPC_Common.inc(269) : error 033: array must be indexed (variable "ACameras")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Na linha que vocк me passou:
Код:
	ACameras[CamID] = Create3DTextLabel(stringr, 0xFF0000FF, x, y, z+6.0, 100.0, 0, 0);
Procura por ACameras em PPC_Defines

pawn Код:
enum TSpeedCamera
{
    Float:CamX,
    Float:CamY,
    Float:CamZ,
    Float:CamAngle,
    CamSpeed,
    CamObj1,
    CamObj2,
    Text3D:CamText // Adicione
}
new ACameras[MAX_CAMERAS][TSpeedCamera];
E lб onde estava o warning, deixe assim
pawn Код:
ACameras[CamID][CamText] = Create3DTextLabel(stringr, 0xFF0000FF, x, y, z+6.0, 100.0, 0, 0);
Reply
#9

passa essa enum
ACameras
Reply
#10

[QUOTE=Nickvj7;2889774]Procura por ACameras em PPC_Defines

pawn Код:
enum TSpeedCamera
{
    Float:CamX,
    Float:CamY,
    Float:CamZ,
    Float:CamAngle,
    CamSpeed,
    CamObj1,
    CamObj2,
    Text3D:CamText // Adicione
}
new ACameras[MAX_CAMERAS][TSpeedCamera];
Fiz isso e deram apenas 2 erros amigo.
Код:
C:\Users\Julio\Desktop\PPC_Trucking\pawno\include\PPC_Common.inc(258) : warning 219: local variable "CamText" shadows a variable at a preceding level
C:\Users\Julio\Desktop\PPC_Trucking\pawno\include\PPC_Common.inc(258) : warning 203: symbol is never used: "CamText"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Opa havia dado esse erro porйm o CamText tava rapitido e jб consegui resolver, fico grato pela ajuda de todos
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)