Jump to content
  • 0

pomoc Zvláštny ERROR


AduLo_

Dotaz

C:\Users\AduLo\Downloads\MWarps.pwn(28) : error 017: undefined symbol "ShowPlayerDialog"
C:\Users\AduLo\Downloads\MWarps.pwn(32) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
 
 
1 Error.
 
 
 
public OnPlayerCommandText(playerid, cmdtext[])
{
       if(!strcmp(cmdtext, "/warpy", true))
    {
       new string[1200];
       strcat(string, "{1B1BE0}-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ \n");
       strcat(string, "{8CED15}Warp Systém Serveru SpeedGame \n");
       strcat(string, "{8CED15}/lv /ls /sf /tuninglv /tuningsf /tuningls /zakladna /driftls /dragon \n");
       strcat(string, "{8CED15}/urad /policielv /policiels /gg /prehrada /chiliand /prehrada /park /bigtunel \n");
       strcat(string, "{8CED15}/smesto /jizzy /farma /most /wang /caligula /skok /xxx /ballas \n");
       strcat(string, "{8CED15}/aztecas /grove /vagos /benzinka /mesto /uradls /chata /spawn /dedina \n");
       strcat(string, "{8CED15}/tp /motel /rybnik /koryto /plaz /posilovna /molols /pout /nevada /port \n");
       strcat(string, "{8CED15}/binco /parkovisko /burger /centrum /zakladnasf /autoskola /draglv /dragls \n");
       strcat(string, "{8CED15}/dragsf /driftpoust /driftsf /skatepark /ostrov /driftlv /stadion /stuntsf \n");
       strcat(string, "{1B1BE0}-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ \n");
       ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"{8CED15}Warp Systém",string,"OK","");
       return 1;
    }
    
        if (strcmp("/tuningsf", cmdtext, true, 10) == 0)
{
        new vehicleid = GetPlayerVehicleID(playerid);
   if(IsPlayerInAnyVehicle(playerid))
        {
        SetVehiclePos(vehicleid, -2697.5461,217.7029,4.1797);
        } else {
        SetPlayerPos(playerid, -2697.5461,217.7029,4.1797);
        }
new str[128];
        GetPlayerName(playerid,str,sizeof(str));
        format(str,sizeof(str),"{8CED15}Hráč {1B1BE0}%s {8CED15}sa odwarpoval na {1B1BE0}Tuning v SF",str,playerid);
        SendClientMessageToAll(-1,str);
        return 1;
}

 

Link to comment
Share on other sites

3 odpovědí na tuto otázku

Recommended Posts

  • 0

Navrch daj

#include <a_samp>

Vôbec to nie je "Zvláštny error". 
Je to undefined symbol. 
Názov príspevku má zhŕňať jeho obsah.

P.S.:
Snaž sa používať čo najmenšie stringy.
Ešte pár takýchto naraz:

new string[1200];

a prestane ti fungovať mód.

Link to comment
Share on other sites

  • 0

#include <a_samp> 

 

 

tam mám len som to zabudol skopirovať..

 

 

 
new Float:xteleport,Float:yteleport,Float:zteleport;
 
#include <a_samp>
 
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
 
#if defined FILTERSCRIPT
 
#endif
 
public OnPlayerCommandText(playerid, cmdtext[])
{
       if(!strcmp(cmdtext, "/warpy", true))
    {
       new string[1200];
       strcat(string, "{1B1BE0}-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ \n");
       strcat(string, "{8CED15}Warp Systém Serveru SpeedGame \n");
       strcat(string, "{8CED15}/lv /ls /sf /tuninglv /tuningsf /tuningls /zakladna /driftls /dragon \n");
       strcat(string, "{8CED15}/urad /policielv /policiels /gg /prehrada /chiliand /prehrada /park /bigtunel \n");
       strcat(string, "{8CED15}/smesto /jizzy /farma /most /wang /caligula /skok /xxx /ballas \n");
       strcat(string, "{8CED15}/aztecas /grove /vagos /benzinka /mesto /uradls /chata /spawn /dedina \n");
       strcat(string, "{8CED15}/tp /motel /rybnik /koryto /plaz /posilovna /molols /pout /nevada /port \n");
       strcat(string, "{8CED15}/binco /parkovisko /burger /centrum /zakladnasf /autoskola /draglv /dragls \n");
       strcat(string, "{8CED15}/dragsf /driftpoust /driftsf /skatepark /ostrov /driftlv /stadion /stuntsf \n");
       strcat(string, "{1B1BE0}-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ \n");
       ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"{8CED15}Warp Systém",string,"OK","");
       return 1;
    }
        if (strcmp("/tuningsf", cmdtext, true, 10) == 0)
{
        new vehicleid = GetPlayerVehicleID(playerid);
   if(IsPlayerInAnyVehicle(playerid))
        {
        SetVehiclePos(vehicleid, -2697.5461,217.7029,4.1797);
        } else {
        SetPlayerPos(playerid, -2697.5461,217.7029,4.1797);
        }
new str[128];
        GetPlayerName(playerid,str,sizeof(str));
        format(str,sizeof(str),"{8CED15}Hráč {1B1BE0}%s {8CED15}sa odwarpoval na {1B1BE0}Tuning v SF",str,playerid);
        SendClientMessageToAll(-1,str);
        return 1;
}
      if (strcmp("/tuninglv", cmdtext, true, 10) == 0)
{
        new vehicleid = GetPlayerVehicleID(playerid);
   if(IsPlayerInAnyVehicle(playerid))
        {
        SetVehiclePos(vehicleid, 2387.0615,1022.4939,10.8203);
        } else {
        SetPlayerPos(playerid, 2387.0615,1022.4939,10.8203);
        }
new str[128];
        GetPlayerName(playerid,str,sizeof(str));
        format(str,sizeof(str),"{8CED15}Hráč {1B1BE0}%s {8CED15}sa odwarpoval na {1B1BE0}Tuning v LV",str,playerid);
        SendClientMessageToAll(-1,str);
        return 1;
}
Link to comment
Share on other sites

  • 0

http://pastebin.com/0RSz2WD8
Je to na Pastebin, protože je tam pěkně vidět tabování
jo s těma stringama(velikost) souhlasim žere to zbytečně pamět a ani nebude využitá celá vyhrazená pamět pro dannou proměnnou
už tam máš menší co by mělo stačit má to cca 768 znaků dal jsem 785 radši o trochu víc
nauč se tabovat
a

new Float:xteleport,Float:yteleport,Float:zteleport;

jsem nikde neviděl použití a stejně to psalo že to nebylo nikde použito

takže je to jako komentář v pawn( začíná to //)

P.S ten error o ShowPlayerDialog je podle mě že máš staré a_samp.inc a ost. includy
tak aktualizuj a neměl jsi uzavřený OnPlayerCommandText a u FS je nutné mít OnFilterScriptInit a OnFilterScriptExit ikdyž třeba prázdný
a newy se nedávají nad includy ale vždy pod první jsou vždy includy

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...