ShowPlayerDialog(playerid, DIALOG_PETROLEO, DIALOG_STYLE_LIST, "{A60000}* Cargas disponiveis * {FFFFFF}Local - {007100}Preзo", "Posto de Fort Carson = {007100}R$100\nPosto de Bone County = {007100}R$120\nPosto de Las Venturas || = {007100}R$300\nPosto de Redsands West = {007100}R$350\nPosto de Tierra Robada = {007100}R$400\nPosto de Las Venturas = {007100}R$400\nPosto de Tierra Robada || = {007100}R$450\nPosto de The Emerald Isle = {007100}R$600\nPosto de Montgomery = {007100}R$600\nPosto de Dillimore = {007100}R$750\nPosto de Temple = {007100}R$850\nPosto de Spinybed = {007100}R$900\nPosto de Easter Basin = {007100}R$920\nPosto de Flint County = {007100}R$950\nPosto de Juniper Hallow = {007100}R$1050\nPosto de Idlewood = {007100}R$1200\nPosto de Angel Pine = {007100}R$1350\nPosto de Whetstone = {007100}R$1400", "Carregar", "");
C:\Users\Fernando\Desktop\PROJETO MVR\gamemodes\MVR.pwn(3252) : error 075: input line too long (after substitutions) C:\Users\Fernando\Desktop\PROJETO MVR\gamemodes\MVR.pwn(3253) : warning 217: loose indentation C:\Users\Fernando\Desktop\PROJETO MVR\gamemodes\MVR.pwn(3253) : error 017: undefined symbol "Posto" C:\Users\Fernando\Desktop\PROJETO MVR\gamemodes\MVR.pwn(3253) : error 017: undefined symbol "de" C:\Users\Fernando\Desktop\PROJETO MVR\gamemodes\MVR.pwn(3253) : error 017: undefined symbol "Fort" C:\Users\Fernando\Desktop\PROJETO MVR\gamemodes\MVR.pwn(3253) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
ShowPlayerDialog(playerid, DIALOG_PETROLEO, DIALOG_STYLE_LIST, "exemplo", "exemplo1\nexemplo 2\n exemplo3", "Ok","");
//Usando strfind:
new st[150];
strfind(st, "exemplo1\n", sizeof st);
strfind(st, "exemplo2\n", sizeof st);
strfind(st, "exemplo3\n", sizeof st);
ShowPlayerDialog(playerid, DIALOG_PETROLEO, DIALOG_STYLE_LIST, "exemplo",st , "Ok","");
ShowPlayerDialog(playerid, DIALOG_PETROLEO, DIALOG_STYLE_LIST, "{A60000}* Cargas disponiveis * {FFFFFF}Local - {007100}Preзo",
"Posto de Fort Carson = {007100}R$100\nPosto de Bone County = {007100}R$120\nPosto de Las Venturas || = {007100}R$300\nPosto de Redsands West = {007100}R$350\nPosto de Tierra Robada = {007100}R$400\nPosto de Las Venturas = {007100}R$400\nPosto de Tierra Robada || = {007100}R$450\nPosto de The Emerald Isle = {007100}R$600\nPosto de Montgomery = {007100}R$600\nPosto de Dillimore = {007100}R$750\nPosto de Temple = {007100}R$850\nPosto de Spinybed = {007100}R$900\nPosto de Easter Basin = {007100}R$920\nPosto de Flint County = {007100}R$950\nPosto de Juniper Hallow = {007100}R$1050\nPosto de Idlewood = {007100}R$1200\nPosto de Angel Pine = {007100}R$1350\nPosto de Whetstone = {007100}R$1400"
,"Carregar", "");
A mensagem estб muito grande use strfind.
|
CMD:carregarP(playerid, params[])
{
format(StrContas, sizeof(StrContas), "Contas/%s.ini", Nome(playerid));
if(DOF2_GetInt(StrContas, "Profissao") == Petroleiro)// Esta verificando se ele й petroleiro
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 514)// Esta verificando se ele esta no caminhгo
{
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))// Esta verificando se ele esta com um reboque
{
if(IsPlayerInRangeOfPoint(playerid, 20.0, 165.699996, 1401.5, 9.5) || IsPlayerInRangeOfPoint(playerid, 20.0, 165.600006, 1419.199951, 9.5))// Coordenadas onde ele pode executar o CMD
{
if(Petroleo[playerid] == 0)// Esta verificando se ele esta carregado
new st[900];
strcat(st, "{FFFFFF}Posto de Fort Carson = {007100}R$100\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Bone County = {007100}R$120\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Las Venturas || = {007100}R$300\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Redsands West = {007100}R$350\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Tierra Robada = {007100}R$400\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Las Venturas = {007100}R$400\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Tierra Robada || = {007100}R$450\n", sizeof st);
strcat(st, "{FFFFFF}Posto de The Emerald Isle = {007100}R$600\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Montgomery = {007100}R$600\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Dillimore = {007100}R$750\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Temple = {007100}R$850\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Spinybed = {007100}R$900\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Easter Basin = {007100}R$920\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Flint County = {007100}R$950\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Juniper Hallow = {007100}R$1050\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Idlewood = {007100}R$1200\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Angel Pine = {007100}R$1350\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Whetstone = {007100}R$1400", sizeof st);
ShowPlayerDialog(playerid, DIALOG_PETROLEO, DIALOG_STYLE_LIST, "{A60000}* Cargas disponiveis * {FFFFFF}Local - {007100}Preзo",st , "Carregar","");
else return SendClientMessage(playerid, ERRO, "|ERRO| Vocк jб esta carregado! Siga o ponto vermelho em seu mapa para descarregar!");
}
else return SendClientMessage(playerid, ERRO, "|ERRO| Vocк nгo esta na area de carregamento!");
}
else return SendClientMessage(playerid, ERRO, "|ERRO| Vocк nгo esta com um reboque de petroleo!");
}
else return SendClientMessage(playerid, ERRO, "|ERRO| Vocк sу pode carregar se estiver dentro do caminhгo!");
}
else return SendClientMessage(playerid, ERRO, "|ERRO| Vocк nгo nгo tem permissгo!");
return true;
}
C:\Users\Fernando\Desktop\PROJETO MVR\gamemodes\MVR.pwn(3253) : error 003: declaration of a local variable must appear in a compound block C:\Users\Fernando\Desktop\PROJETO MVR\gamemodes\MVR.pwn(3253) : error 017: undefined symbol "st" C:\Users\Fernando\Desktop\PROJETO MVR\gamemodes\MVR.pwn(3253) : warning 215: expression has no effect C:\Users\Fernando\Desktop\PROJETO MVR\gamemodes\MVR.pwn(3253) : error 001: expected token: ";", but found "]" C:\Users\Fernando\Desktop\PROJETO MVR\gamemodes\MVR.pwn(3253) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Exatamente tinha esquecido o nome da funзгo, й que tem muitas funзхes com nome que comeзгo com str que as vezes eu esqueзo o nome da funзгo.
FernandoSS A funзгo era strcat e nгo strfind, eu confundi os nomes. Й sу trocar strfind para strcat. |
if(IsPlayerInRangeOfPoint(playerid, 20.0, 165.699996, 1401.5, 9.5) || IsPlayerInRangeOfPoint(playerid, 20.0, 165.600006, 1419.199951, 9.5))// Coordenadas onde ele pode executar o CMD
{
if(Petroleo[playerid] == 0)// Esta verificando se ele esta carregado
{
new st[900];
strcat(st, "{FFFFFF}Posto de Fort Carson = {007100}R$100\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Bone County = {007100}R$120\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Las Venturas || = {007100}R$300\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Redsands West = {007100}R$350\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Tierra Robada = {007100}R$400\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Las Venturas = {007100}R$400\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Tierra Robada || = {007100}R$450\n", sizeof st);
strcat(st, "{FFFFFF}Posto de The Emerald Isle = {007100}R$600\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Montgomery = {007100}R$600\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Dillimore = {007100}R$750\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Temple = {007100}R$850\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Spinybed = {007100}R$900\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Easter Basin = {007100}R$920\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Flint County = {007100}R$950\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Juniper Hallow = {007100}R$1050\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Idlewood = {007100}R$1200\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Angel Pine = {007100}R$1350\n", sizeof st);
strcat(st, "{FFFFFF}Posto de Whetstone = {007100}R$1400", sizeof st);
ShowPlayerDialog(playerid, DIALOG_PETROLEO, DIALOG_STYLE_LIST, "{A60000}* Cargas disponiveis * {FFFFFF}Local - {007100}Preзo",st , "Carregar","");
}
else SendClientMessage(playerid, ERRO, "|ERRO| Vocк jб esta carregado! Siga o ponto vermelho em seu mapa para descarregar!");
}
else SendClientMessage(playerid, ERRO, "|ERRO| Vocк nгo esta na area de carregamento!");