Ayuda "invalid function or declaration" - TheKye2012 - 20.05.2012
hola tengo problema con lo siguiente y ya busque y no encontre alguna solucion alguien que me pueda ayudar?
estos son los errores
Код:
C:\Users\TheKye2012\Desktop\Cops And Robbers\Windows - 3GM\gamemodes\WoW0.2.pwn(598) : error 010: invalid function or declaration
C:\Users\TheKye2012\Desktop\Cops And Robbers\Windows - 3GM\gamemodes\WoW0.2.pwn(610) : error 010: invalid function or declaration
C:\Users\TheKye2012\Desktop\Cops And Robbers\Windows - 3GM\gamemodes\WoW0.2.pwn(621) : error 010: invalid function or declaration
Codigo Pawn.
pawn Код:
rank = TextDrawCreate(500.000000, 112.000000, "_");
TextDrawBackgroundColor(rank, 255);
TextDrawFont(rank, 1);
TextDrawLetterSize(rank, 0.200000, 0.999999);
TextDrawColor(rank, -1);
TextDrawSetOutline(rank, 0);
TextDrawSetProportional(rank, 1);
TextDrawSetShadow(rank, 1);
TextDrawUseBox(rank, 1);
TextDrawBoxColor(rank, 0x00000076);
TextDrawTextSize(rank, 606.000000, -2.000000);}
score = TextDrawCreate(500.000000, 122.000000, "_");
TextDrawBackgroundColor(score, 255);
TextDrawFont(score, 1);
TextDrawLetterSize(score, 0.200000, 0.999999);
TextDrawColor(score, -1);
TextDrawSetOutline(score, 0);
TextDrawSetProportional(score, 1);
TextDrawSetShadow(score, 1);
TextDrawUseBox(score, 1);
TextDrawBoxColor(score, 0x00000076);
TextDrawTextSize(score, 606.000000, -2.000000);}
return 1;
Ayudenme Porfavor Gracias.
Respuesta: Ayuda "invalid function or declaration" -
TiNcH010 - 20.05.2012
Donde tenes eso? Eso es todo o te falto el '}' debajo del return;?
Intenta asн:
pawn Код:
rank = TextDrawCreate(500.000000, 112.000000, "_");
TextDrawBackgroundColor(rank, 255);
TextDrawFont(rank, 1);
TextDrawLetterSize(rank, 0.200000, 0.999999);
TextDrawColor(rank, -1);
TextDrawSetOutline(rank, 0);
TextDrawSetProportional(rank, 1);
TextDrawSetShadow(rank, 1);
TextDrawUseBox(rank, 1);
TextDrawBoxColor(rank, 0x00000076);
TextDrawTextSize(rank, 606.000000, -2.000000);
score = TextDrawCreate(500.000000, 122.000000, "_");
TextDrawBackgroundColor(score, 255);
TextDrawFont(score, 1);
TextDrawLetterSize(score, 0.200000, 0.999999);
TextDrawColor(score, -1);
TextDrawSetOutline(score, 0);
TextDrawSetProportional(score, 1);
TextDrawSetShadow(score, 1);
TextDrawUseBox(score, 1);
TextDrawBoxColor(score, 0x00000076);
TextDrawTextSize(score, 606.000000, -2.000000);
return 1;
}
Usas 2 corchetes de mбs. Como tenes definido 'rank' y 'score' ?
Respuesta: Ayuda "invalid function or declaration" - TheKye2012 - 20.05.2012
si mira lo tengo asi lo tengo, ya tengo definido "Rank" y "score" mira asi:
pawn Код:
new Text:nombre;
new Text:rank;
new Text:score;
y asi tengo el codigo completo.
pawn Код:
public OnGameModeInit()
{
// SetTimer("StatsInfromation",300 , 1);
SendRconCommand("reloadbans");
SetTimer("ChangeHostname",1000,1);
if(RANDOMMSG == 1)
{
SetTimer("SendRandomMessage",TIMER,1);
}
new playerid = playerid;
AddRandomMessage("Hello!, Your Saps That I'm a Bot! XD");
AddRandomMessage("Want More Benefits? Get Your Donate Account From 8USD");
AddRandomMessage("Want More Weapons used /BuyWeapon");
AddRandomMessage("You Need More Commands Use /cmds");
AddRandomMessage("Have you seen a Hacker, Cheater Use /Report");
AddRandomMessage("Some Player Rules Not Meeting report it.");
AddRandomMessage("You have any suggestions, Go to some admin");
AddRandomMessage("you found any bug or error report it to some admin");
AddRandomMessage("How to Play? Ask any admin help you.");
AddRandomMessage("New Vercion 0.2 Beta Coming");
AddRandomMessage("We have 3 teams: USA, Mexico, Russia German");
AddRandomMessage("New Actualitations soon.");
AddRandomMessage("Hola!!, Tu Savias Que yo Soy un Bot! xD");
AddRandomMessage("Quieres Mas Beneficios? Obten Tu Cuenta Donante, Desde 8USD");
AddRandomMessage("Quieres Mas Armas usa /BuyWeapon");
AddRandomMessage("Quieres Saver mas Comandos Usa /cmds");
AddRandomMessage("Has Visto Algun Hacker,Cheater Usa /Report");
AddRandomMessage("Algun Jugador No Cumple Con las Reglas Denuncialo.");
AddRandomMessage("Tienes Alguna Sugerencia, Disela a algun admin");
AddRandomMessage("Encontrastes algun Bug o error? Reportalo a algun admin");
AddRandomMessage("No Savez Como Jugar? Pregunta a algun admin el te ayudara.");
AddRandomMessage("Proximamente Nueva Vercion 0.2 Beta");
AddRandomMessage("Tenemos 3 Equipos: U.S.A, Mexico, Russia German");
AddRandomMessage("Proximamente Nuevas Actualisaciones.");
/* for(new i=0; i < mensajes; i++)
{
Textos[i] = TextDrawCreate(509.000000, 390.000000 + (i * 10), "_");
TextDrawBackgroundColor(Textos[i], 255);
TextDrawFont(Textos[i], 1);
TextDrawLetterSize(Textos[i], 0.370000, 1.011000);
TextDrawColor(Textos[i], -1);
TextDrawSetOutline(Textos[i], 1);
TextDrawSetProportional(Textos[i], 1);
}*/
for(new i; i < MAX_PLAYERS; i ++)
{
TextEntrada[i] = TextDrawCreate(23.000000, 302.000000, "-.-");
TextDrawBackgroundColor(TextEntrada[i], 255);
TextDrawFont(TextEntrada[i], 2);
TextDrawLetterSize(TextEntrada[i], 0.280000, 1.500000);
TextDrawColor(TextEntrada[i], 65535);
TextDrawSetOutline(TextEntrada[i], 1);
TextDrawSetProportional(TextEntrada[i], 1);
TextSalida[i] = TextDrawCreate(23.000000, 302.000000, "-.-");
TextDrawBackgroundColor(TextSalida[i], 255);
TextDrawFont(TextSalida[i], 2);
TextDrawLetterSize(TextSalida[i], 0.280000, 1.500000);
TextDrawColor(TextSalida[i], 65535);
TextDrawSetOutline(TextSalida[i], 1);
TextDrawSetProportional(TextSalida[i], 1);
TextPing[i] = TextDrawCreate(23.000000, 318.000000, "-.-");
TextDrawBackgroundColor(TextPing[i], 255);
TextDrawFont(TextPing[i], 2);
TextDrawLetterSize(TextPing[i], 0.280000, 1.500000);
TextDrawColor(TextPing[i], -16776961);
TextDrawSetOutline(TextPing[i], 1);
TextDrawSetProportional(TextPing[i], 1);
}
LoadMods();
SetTimer("Starting", 10000, 0);
///////////////////////////////
UsePlayerPedAnims();
SetGameModeText("World of War v0.1");
Riided();
Vahendid();
Objektid();
//TextDraw
Textdraw0 = TextDrawCreate(2.000000, 435.000000, "/cmds");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
Textdraw1 = TextDrawCreate(324.000000, 436.000000, "Languages: /eng /esp");
TextDrawAlignment(Textdraw1, 2);
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 3);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 2);
TextDrawUseBox(Textdraw1, 1);
TextDrawBoxColor(Textdraw1, 255);
TextDrawTextSize(Textdraw1, 120.000000, 646.000000);
Textdraw2 = TextDrawCreate(60.000000, 435.000000, "/Donator /admins");
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.500000, 1.000000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 0);
TextDrawSetProportional(Textdraw2, 1);
TextDrawSetShadow(Textdraw2, 1);
Textdraw3 = TextDrawCreate(435.000000, 435.000000, "World Of War 3 - v0.1");
TextDrawBackgroundColor(Textdraw3, 255);
TextDrawFont(Textdraw3, 1);
TextDrawLetterSize(Textdraw3, 0.500000, 1.000000);
TextDrawColor(Textdraw3, -1);
TextDrawSetOutline(Textdraw3, 0);
TextDrawSetProportional(Textdraw3, 1);
TextDrawSetShadow(Textdraw3, 1);
nombre = TextDrawCreate(500.000000, 105.000000, "_");
TextDrawBackgroundColor(nombre, 255);
TextDrawFont(nombre, 1);
TextDrawLetterSize(nombre, 0.200000, 0.999999);
TextDrawColor(nombre, -1);
TextDrawSetOutline(nombre, 0);
TextDrawSetProportional(nombre, 1);
TextDrawSetShadow(nombre, 1);
TextDrawUseBox(nombre, 1);
TextDrawBoxColor(nombre, 0x00000076);
TextDrawTextSize(nombre, 606.000000, -2.000000);}
rank = TextDrawCreate(500.000000, 112.000000, "_");
TextDrawBackgroundColor(rank, 255);
TextDrawFont(rank, 1);
TextDrawLetterSize(rank, 0.200000, 0.999999);
TextDrawColor(rank, -1);
TextDrawSetOutline(rank, 0);
TextDrawSetProportional(rank, 1);
TextDrawSetShadow(rank, 1);
TextDrawUseBox(rank, 1);
TextDrawBoxColor(rank, 0x00000076);
TextDrawTextSize(rank, 606.000000, -2.000000);}
score = TextDrawCreate(500.000000, 122.000000, "_");
TextDrawBackgroundColor(score, 255);
TextDrawFont(score, 1);
TextDrawLetterSize(score, 0.200000, 0.999999);
TextDrawColor(score, -1);
TextDrawSetOutline(score, 0);
TextDrawSetProportional(score, 1);
TextDrawSetShadow(score, 1);
TextDrawUseBox(score, 1);
TextDrawBoxColor(score, 0x00000076);
TextDrawTextSize(score, 606.000000, -2.000000);}
return 1;
}
Respuesta: Ayuda "invalid function or declaration" -
TiNcH010 - 20.05.2012
Mmmm intenta reemplazando esto:
pawn Код:
nombre = TextDrawCreate(500.000000, 105.000000, "_");
TextDrawBackgroundColor(nombre, 255);
TextDrawFont(nombre, 1);
TextDrawLetterSize(nombre, 0.200000, 0.999999);
TextDrawColor(nombre, -1);
TextDrawSetOutline(nombre, 0);
TextDrawSetProportional(nombre, 1);
TextDrawSetShadow(nombre, 1);
TextDrawUseBox(nombre, 1);
TextDrawBoxColor(nombre, 0x00000076);
TextDrawTextSize(nombre, 606.000000, -2.000000);
rank = TextDrawCreate(500.000000, 112.000000, "_");
TextDrawBackgroundColor(rank, 255);
TextDrawFont(rank, 1);
TextDrawLetterSize(rank, 0.200000, 0.999999);
TextDrawColor(rank, -1);
TextDrawSetOutline(rank, 0);
TextDrawSetProportional(rank, 1);
TextDrawSetShadow(rank, 1);
TextDrawUseBox(rank, 1);
TextDrawBoxColor(rank, 0x00000076);
TextDrawTextSize(rank, 606.000000, -2.000000);
score = TextDrawCreate(500.000000, 122.000000, "_");
TextDrawBackgroundColor(score, 255);
TextDrawFont(score, 1);
TextDrawLetterSize(score, 0.200000, 0.999999);
TextDrawColor(score, -1);
TextDrawSetOutline(score, 0);
TextDrawSetProportional(score, 1);
TextDrawSetShadow(score, 1);
TextDrawUseBox(score, 1);
TextDrawBoxColor(score, 0x00000076);
TextDrawTextSize(score, 606.000000, -2.000000);
Respuesta: Ayuda "invalid function or declaration" - TheKye2012 - 20.05.2012
WoW Amigo Muchas Gracias me podrias desir que estaba mal o porque se da ese error?? para no volverlo a cometer +1 Rep.
Respuesta: Ayuda "invalid function or declaration" -
TiNcH010 - 20.05.2012
De nada. Si, ya te dije, vos tenнas una llave de mбs en las lнneas de TextDrawTextSize, mira un ejemplo vos tenнas:
TextDrawTextSize(nombre, 606.000000, -2.000000);
} ese corchete no deberнa ir.
Saludos
Respuesta: Ayuda "invalid function or declaration" - TheKye2012 - 20.05.2012

jajajaja si ya veo es que como use copiar y pegar de un solo TextDraw nadamas modifique algunas cosas ajajaj bueno entonces muchas Gracias.
Hasta Luego.