Jump to content
  • 0

pomoc Errors & Warnings


ErionX

Dotaz

C:\Documents and Settings\[CENSURA]\[CENSURA]\[CENSURA].pwn(124) : error 010: invalid function or declaration

C:\Documents and Settings\[CENSURA]\[CENSURA]\[CENSURA].pwn(1790) : warning 209: function "OnPlayerCommandText" should return a value

C:\Documents and Settings\[CENSURA]\[CENSURA]\[CENSURA].pwn(1792) : error 055: start of function body without function header

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(1797) : error 010: invalid function or declaration

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(1801) : error 010: invalid function or declaration

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(1803) : error 010: invalid function or declaration

C:\Documents and Settings\[CENSURA]Plocha\[CENSURA].pwn(1805) : error 010: invalid function or declaration

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(1811) : error 010: invalid function or declaration

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(1815) : error 010: invalid function or declaration

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(1819) : error 010: invalid function or declaration

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(1822) : error 010: invalid function or declaration

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(1824) : error 010: invalid function or declaration

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(1826) : error 010: invalid function or declaration

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(1831) : error 010: invalid function or declaration

C:\Documents and Settings\[CENSURA]Plocha\[CENSURA].pwn(1835) : error 010: invalid function or declaration

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(1839) : error 010: invalid function or declaration

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(1877) : warning 219: local variable "cmd" shadows a variable at a preceding level

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(2004) : warning 203: symbol is never used: "SavePlayerPos"

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(2004) : warning 203: symbol is never used: "cmd"

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(2004) : warning 203: symbol is never used: "idx"

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(2004) : warning 203: symbol is never used: "sCalcTimer"

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(2004) : warning 203: symbol is never used: "sGSPSTimer"

C:\Documents and Settings\[CENSURA]Plocha\[CENSURA].pwn(2004) : warning 203: symbol is never used: "sIsInitalize"

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(2004) : warning 203: symbol is never used: "sOldPos"

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(2004) : warning 203: symbol is never used: "sPVehicle"

C:\Documents and Settings\[CENSURA]\Plocha\[CENSURA].pwn(2004) : warning 203: symbol is never used: "thespeed"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

15 Errors.

 

Prosím o pomoc ...

 

Něják jsem tam blbě vložil Tacháč :(

Link to comment
Share on other sites

Recommended Posts

  • 0

#include

#pragma tabsize 0

 

new showspeedo[MAX_PLAYERS];

 

enum SavePlayerPosEnum

{

Float:LastX,

Float:LastY,

Float:LastZ

}

 

new SavePlayerPos[100][savePlayerPosEnum];

forward Speedo();

forward StatUp();

 

new thespeed[100];

new sPVehicle[100];

 

new sIsInitalize;

 

new sOldState[100];

new sCalcTimer;

new sGSPSTimer;

new Float:sOldPos[MAX_VEHICLES][3];

 

new Text:sSpeedoText[100];

 

if(strcmp(cmdtext, "/drift53", true, 10) == 0)

{

if(IsPlayerInAnyVehicle(playerid))

{

if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)

{

SetVehiclePos(GetPlayerVehicleID(playerid),835.6555,-878.2632,68.0216);

SetVehicleZAngle(GetPlayerVehicleID(playerid), 238.8432);

SetCameraBehindPlayer(playerid);

format(string, sizeof(string), "%s [iD] se odwarpoval na Drift 53 (/drift53)", pName, playerid);

SendClientMessageToAll(COLOR_YELLOW, string);

GameTextForPlayer(playerid, "~w~Vitej na Drift 53! ~G~", 5000, 5);

}

else

{

SendClientMessage(playerid, COLOR_RED, "Chyba: Musite byt ridic!");

}

}

else

{

SetPlayerPos(playerid, 835.6555,-878.2632,68.0216);

SetPlayerFacingAngle(playerid, 238.8432);

SetCameraBehindPlayer(playerid);

format(string, sizeof(string), "%s [iD] se odwarpoval na Drift 53 (/drift53)", pName, playerid);

SendClientMessageToAll(COLOR_YELLOW, string);

GameTextForPlayer(playerid, "~w~Vitej na Drift 53! ~G~", 5000, 5);

}

return 1;

}

}

 

{

 

 

new idx;

new cmd[256];

cmd = strtok(cmdtext, idx);

 

 

 

if(!strcmp (cmdtext ,"/hidetach" , true )) {

 

if(showspeedo[playerid] == 1)

{

if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)

{

TextDrawHideForPlayer(playerid, sSpeedoText[playerid]);

showspeedo[playerid] = 0;

SendClientMessage(playerid, 0xFF8000FF, "Tachometr je nyní skrytý.");

SendClientMessage(playerid, 0xFFFF00FF, "Chcete-li zobrazit svůj tachometr zadejte /showtach.");

}else

{

SendClientMessage(playerid, 0xFF8000FF, "Musíte být řidičem použít tento příkaz");

}

}else

{

SendClientMessage(playerid, 0xFF0000AA, "Váš tachometr je již pryč");

}

return 1;

}

 

if(strcmp(cmd, "/showtach", true) == 0)

{

if(showspeedo[playerid] == 0)

{

if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)

{

TextDrawShowForPlayer(playerid, sSpeedoText[playerid]);

showspeedo[playerid] = 1;

SendClientMessage(playerid, 0xFFFF00FF, "Tachometr je nyní zobrazen");

}else

{

SendClientMessage(playerid, 0xFF8000FF, "Musíte být řidič vozidla, aby jste mohl použít tento příkaz");

}

}else

{

SendClientMessage(playerid, 0xFF0000AA, "Váš tachometr je již na");

}

return 1;

}

 

public OnPlayerConnect(playerid)

{

new name[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];

GameTextForPlayer(playerid,"~w~[CENSURA] ~r~CENSURA] ~g~CENSURA]",5000,5);

GetPlayerName(playerid, name, sizeof(name));

format(string, sizeof(string), "%s [iD] se pripojil na server.",name, playerid);

SendClientMessageToAll(COLOR_GREY, string);

 

SendClientMessage(playerid, COLOR_GREEN, "Vitejte na [CENZURA], pro seznam prikazu /prikazy");

return 1;

}

sOldState[playerid] = GetPlayerState(playerid);

showspeedo[playerid] = 1;

 

public OnPlayerDisconnect(playerid, reason)

{

showspeedo[playerid] = 1;

if(sOldState[playerid] == PLAYER_STATE_DRIVER)

{

new vehicleid;

vehicleid = GetPlayerVehicleID(playerid);

if(vehicleid)

{

TextDrawHideForPlayer(playerid, sSpeedoText[playerid]);

}

}

return 1;

}

 

Tohle jsem jen vystřihl ...

 

Takhle to v pawně samozřejmě nemám .... mám tam toho mnohem víc :) ale tohle je ten tacháč

Link to comment
Share on other sites

  • 0

Tak na to kdyžtak kašlu ... teď jsem zkoušel udělat povolání a další 4 errory

 

C:\Documents and Settings\Josef\Plocha\drift.pwn(1860) : warning 217: loose indentation

C:\Documents and Settings\[CENZURA]Plocha\[CENZURA].pwn(1863) : error 003: declaration of a local variable must appear in a compound block

C:\Documents and Settings\[CENZURA]\Plocha\[CENZURA].pwn(1863) : error 017: undefined symbol "string"

C:\Documents and Settings\[CENZURA]\Plocha\[CENZURA].pwn(1863) : warning 215: expression has no effect

C:\Documents and Settings\[CENZURA]Plocha\[CENZURA].pwn(1863) : error 001: expected token: ";", but found "]"

C:\Documents and Settings\[CENZURA]\Plocha\[CENZURA].pwn(1863) : fatal error 107: too many error messages on one line

 

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

4 Errors.

 

Code

 

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)

{

if(oldkeys & KEY_FIRE && IsPlayerInAnyVehicle(playerid))

{

if(GetVehicleType(playerid) != 1)

{

AddVehicleComponent(GetPlayerVehicleID(playerid),1010);

}

return 1;

}

if(newkeys == KEY_WALK)

new string[200];

new pname[MAX_PLAYER_NAME];

if (IsPlayerInSphere(playerid,1953.1222,-1342.9468,15.3746,359) == 1){ //Pozice kde ten L.ALT se muze pouzit + vzdalenost co z vzdalenost je ta 1 na konci xD

format(string, sizeof(string), "[ ! ] Hráč %s se zaměstnal jako Drifter.", pname);

SendClientMessageToAll(COLOR_RED, string);

/*povolani[playerid] = 0;

povolani[playerid] = 2;*/

{

GivePlayerWeapon(playerid,4,1); //Da zbran ;) xD

}

return 1;

}

return 0;

}

 

 

Kdyžtak to první je neomezené nitro.... :) (funkční :d)

Link to comment
Share on other sites

  • 0

Tady v tom je přesně error. Prosím pomožte mi :)

 

        return 1;
  }
  if(newkeys == KEY_WALK)
  new string[200];

 

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if(oldkeys & KEY_FIRE && IsPlayerInAnyVehicle(playerid))
  {
     if(GetVehicleType(playerid) != 1)
     {
         AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
     }
       return 1;
  }
  if(newkeys == KEY_WALK)
  new string[200];
  new pname[MAX_PLAYER_NAME];
  if (IsPlayerInSphere(playerid,1953.1222,-1342.9468,15.3746,359) == 1){ //Pozice kde ten L.ALT se muze pouzit + vzdalenost co z vzdalenost je ta 1 na konci xD
  format(string, sizeof(string), "[ ! ] Hráč %s se zaměstnal jako Drifter.", pname);
  SendClientMessageToAll(COLOR_RED, string);
  /*povolani[playerid] = 0;
  povolani[playerid] = 2;*/
  {
  GivePlayerWeapon(playerid,4,1); //Da zbran  xD
  }
       return 1;
}
return 0;
}

Link to comment
Share on other sites

  • 0
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if(oldkeys & KEY_FIRE && IsPlayerInAnyVehicle(playerid))
  {
     if(GetVehicleType(playerid) != 1)
     {
         AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
     }
  }
  if(newkeys == KEY_WALK && IsPlayerInSphere(playerid,1953.1222,-1342.9468,15.3746,359) == 1){
  new string[200];
  new pname[MAX_PLAYER_NAME];
  format(string, sizeof(string), "[ ! ] Hráč %s se zaměstnal jako Drifter.", pname);
  SendClientMessageToAll(COLOR_RED, string);
  /*povolani[playerid] = 0;
  povolani[playerid] = 2;*/
  GivePlayerWeapon(playerid,4,1); //Da zbran  xD
  }
       return 1;
  }

Link to comment
Share on other sites

  • 0

A teď mi to hazí 1 error a 2 warningy.Jinak díky že jsi mi opravil tam ty errory :)

 

C:\Documents and Settings\[CENZURA]\Plocha\[CENZURA].pwn(1861) : error 017: undefined symbol "IsPlayerInSphere"

C:\Documents and Settings\[CENZURA]\Plocha\[CENZURA].pwn(1870) : warning 217: loose indentation

C:\Documents and Settings\[CENZURA]\Plocha\[CENZURA].pwn(74) : warning 204: symbol is assigned a value that is never used: "drifter"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

1 Error.

 

Error mi t hazí tady na tomhle řádku

if(newkeys == KEY_WALK && IsPlayerInSphere(playerid,1953.1222,-1342.9468,15.3746,359) == 1){

 

Warning na tomhle

return 1;

 

Další Warning na tomhle

drifter = CreatePickup(1581,1,1953.1222,-1342.9468,15.3746);

Link to comment
Share on other sites

  • 0

k definicim:

#pragma tabsize 0

 

uplne dolu:

IsPlayerInSphere(playerid,Float:x,Float:y,Float:z,radius)
{
  if(GetPlayerDistanceToPointEx(playerid,x,y,z) < radius){
  return true;
}
  return false;
}
GetPlayerDistanceToPointEx(playerid,Float:x,Float:y,Float:z)
{
  new Float:x1,Float:y1,Float:z1;
  new Float:tmpdis;
  GetPlayerPos(playerid,x1,y1,z1);
  tmpdis = floatsqroot(floatpower(floatabs(floatsub(x,x1)),2)+floatpower(floatabs(floatsub(y,y1)),2)+floatpower(floatabs(floatsub(z,z1)),2));
  return floatround(tmpdis);
}

 

a pak musis nekde pouzit symbol drifter.. a pokud ho pouzivat nebudes tak :

drifter = CreatePickup(1581,1,1953.1222,-1342.9468,15.3746);

prepis na:

CreatePickup(1581,1,1953.1222,-1342.9468,15.3746);

Link to comment
Share on other sites

  • 0

Zkoušel jsem teď povolání přez Dialog a mám dva errory

 

C:\Documents and Settings\[CENZURA]\Plocha\[CENZURA].pwn(13) : error 017: undefined symbol "MAX_PLAYERS"

C:\Documents and Settings\[CENZURA]\\Plocha\[CENZURA].pwn(13) : error 009: invalid array size (negative, zero or out of bounds)

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

2 Errors.

 

Je to řádek

 

new Job[MAX_PLAYERS];

Link to comment
Share on other sites

  • 0

DooM Warning

 

C:\Documents and Settings\[CENZURA]\Plocha\pawno\include\a_samp.inc(30) : warning 201: redefinition of constant/macro (symbol "MAX_PLAYERS")

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

1 Warning.

 

Tento řádek

 

#define COLOR_RED 0xAA3333AA

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...