[error]label
#1

ola amigos de forum samp tengo un problema lo que pasa es que tengo en mi ladmin
uno sistema de label hecho por mi y miren es por ejemplo que cuando escribes:
/labeladmin
arriba del administrador le seldra ..::administrador::..
y asi etc.. tengo algunos en mi ladmin que hice
pero bueno miren el error es este puse un comando
en el cual sirve para destruir el label, vi en wiki.samp pero no me ayudo en nada :/
y bueno les digo aqui para que me ayuden con esto los warnings son los siguientes:

Quote:

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.

las lineas son estas:

line 3022:
new Text3D:label = Create3DTextLabel("{ff0000}Administrador/Dueсo", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);

line 3032:
new Text3D:label = Create3DTextLabel("{ff0000}Administrador/Subdueсo", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);

line 3042:
new Text3D:label = Create3DTextLabel("{ff0000}Encargado del server", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);

line 3052:
new Text3D:label = Create3DTextLabel("{ff0000}Moderador", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);

line 3062:
new Text3D:label = Create3DTextLabel("{ff0000}Administrador", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);

line 3071:
new Text3D:label = Create3DTextLabel("{ffffff}Jugador Normal", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);

line 3082:
new Text3D:label = Create3DTextLabel("{FFFF00}Vip", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);

y la ultima linea es la que puse como comando para destruir el 3DTextlabel:
Delete3DTextLabel(label);

es esa y no se porque me salen esos warning ayudenme por favor :C
Reply
#2

pawn Код:
// 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]);
Reply
#3

Utilizas una variable global con el mismo "nombre" que utilizas con las variables del label. Si no me equivoco.

Te recomiendo algo asн:



pawn Код:
// 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]);
}
Saludos.
Reply
#4

Quote:
Originally Posted by EnzoMetlc
Посмотреть сообщение
Utilizas una variable global con el mismo "nombre" que utilizas con las variables del label.

Te recomiendo algo asн:



pawn Код:
// 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]);
}
Saludos.
Es lo que yo dije q.q
Estaba haciйndolo antes y tal, xDD
Reply
#5

Traducciуn del error al espaсol:

pawn Код:
Advertencia 219: Variable local "label" estб siendo usada en niveles anteriores.
Bбsicamente el problema que tienes que la variable "label" le estбs asignando varios valores.
Reply
#6

Quote:
Originally Posted by byNer0x
Посмотреть сообщение
Es lo que yo dije q.q
Estaba haciйndolo antes y tal, xDD
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.
Reply
#7

Quote:
Originally Posted by EnzoMetlc
Посмотреть сообщение
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.
Igual lo hicimos bien ambos, xD.
A esperar su respuesta c:
Reply
#8

me tira estos errores y son en la misma linea miren:
Quote:

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.

la linea:
label[0] = Create3DTextLabel("{ff0000}Administrador/Dueсo", 0xB4B4B4FF, 30.0, 40.0, 50.0, 40.0, 0);

que hago
Reply
#9

pawn Код:
#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.
Reply
#10

otacon me sale este error ._:
Quote:

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.

la linea:
Destroy3DTextLabel(LabelAdmin[index]);
PD: recuerda que el sistema esta en mi ladmin!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)