D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\filterscripts\LadminZaC.pwn(3022) : warning 219: local variable "label" shadows a variable at a preceding level D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\filterscripts\LadminZaC.pwn(3032) : warning 219: local variable "label" shadows a variable at a preceding level D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\filterscripts\LadminZaC.pwn(3042) : warning 219: local variable "label" shadows a variable at a preceding level D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\filterscripts\LadminZaC.pwn(3052) : warning 219: local variable "label" shadows a variable at a preceding level D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\filterscripts\LadminZaC.pwn(3062) : warning 219: local variable "label" shadows a variable at a preceding level D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\filterscripts\LadminZaC.pwn(3071) : warning 219: local variable "label" shadows a variable at a preceding level D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\filterscripts\LadminZaC.pwn(3082) : warning 219: local variable "label" shadows a variable at a preceding level D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\filterscripts\LadminZaC.pwn(3091) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Warnings. |
// Donde tengas las variables pones:
new Text3D:label[7]; // 7 = cantidad de label que tengas
// Las lнneas las cambias para que estйn asн
// line 3022:
label[0] = Create3DTextLabel("{ff0000}Administrador/Dueсo", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
// line 3032:
label[1] = Create3DTextLabel("{ff0000}Administrador/Subdueсo", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
// line 3042:
label[2] = Create3DTextLabel("{ff0000}Encargado del server", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
// line 3052:
label[3] = Create3DTextLabel("{ff0000}Moderador", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
// line 3062:
label[4] = Create3DTextLabel("{ff0000}Administrador", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
// line 3071:
label[5] = Create3DTextLabel("{ffffff}Jugador Normal", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
// line 3082:
label[6] = Create3DTextLabel("{FFFF00}Vip", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
// Cambia "Delete3DTextLabel(label);" por:
for(new lab = 0; lab < 7; lab++) Delete3DTextLabel(label[lab]);
// Una variable global
new Text3D:Label[7];
// en donde deseas...
Label[0] = Create3DTextLabel("Administrador/Dueсo", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
Label[1] = Create3DTextLabel("Administrador/Subdueсo", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
Label[2] = Create3DTextLabel("Encargado del server", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
Label[3] = Create3DTextLabel("Moderador", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
Label[4] = Create3DTextLabel("Administrador", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
Label[5] = Create3DTextLabel("Jugador Normal", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
Label[6] = Create3DTextLabel("Vip", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
// En donde los destruyes...
for(new i = 0; i < 7; i++)
{
Destroy3DTextLabel(Label[i]);
}
Utilizas una variable global con el mismo "nombre" que utilizas con las variables del label.
Te recomiendo algo asн: pawn Код:
|
Advertencia 219: Variable local "label" estб siendo usada en niveles anteriores.
LoL, no vн tu comment, creн que serнa el primero en comentar y me tomй la molestia de hacerle un pequeсo cуdigo y explicarle algo xD.
|
D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\filterscripts\LadminZaC.pwn(3023) : error 017: undefined symbol "label" D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\filterscripts\LadminZaC.pwn(3023) : warning 215: expression has no effect D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\filterscripts\LadminZaC.pwn(3023) : error 001: expected token: ";", but found "]" D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\filterscripts\LadminZaC.pwn(3023) : error 029: invalid expression, assumed zero D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\filterscripts\LadminZaC.pwn(3023) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
#include <a_samp>
new Text3D:LabelAdmin[7];
public OnFilterScriptInit() {
LabelAdmin[0] = Create3DTextLabel("Administrador/Dueсo", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
LabelAdmin[1] = Create3DTextLabel("Administrador/Subdueсo", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
LabelAdmin[2] = Create3DTextLabel("Encargado del server", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
LabelAdmin[3] = Create3DTextLabel("Moderador", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
LabelAdmin[4] = Create3DTextLabel("Administrador", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
LabelAdmin[5] = Create3DTextLabel("Jugador Normal", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
LabelAdmin[6] = Create3DTextLabel("Vip", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);
return true;
}
public OnFilterScriptExit() {
for(new index = 0; index < 7; index++) { Destroy3DTextLabel(LabelAdmin[index]); }
return true;
}
//esto donde asignas el nivel de administrador al jugador.
Attach3DTextLabelToPlayer(LabelAdmin[nivel], playerid, 0.0, 0.0, 0.7); //cambia nivel con el numero del nivel del admin correspondiente.
D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\filterscripts\LadminZaC.pwn(3094) : error 017: undefined symbol "Destroy3DTextLabel" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |