Szerző Téma: Errorok  (Megtekintve 556 alkalommal)

Errorok
« Dátum: 2012. október 19. - 13:38:51 »
0 Show voters
Sziasztok!Csináltam egy km/h szkriptet de valamiért errorozik,kitudnátok nekem javitani?(Aki ki javitsa nekem ment a respect!)
 

//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#include <a_samp>
#include <fixchars.h>
new PlayerText:sebesseg[MAX_PLAYERS];
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\"KM/h by:[sDW]BlackJack\");
print(\"--------------------------------------\\n\");
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
sebesseg[playerid] = TextDrawCreate(240.000000, 380.000000, \"Sebesség:\");
TextDrawBackgroundColor(sebesseg[playerid], 255);
TextDrawFont(sebesseg[playerid], 1);
TextDrawLetterSize(sebesseg[playerid], 0.500000, 1.500000);
TextDrawColor(sebesseg[playerid], 0xFFFF00FF);
TextDrawSetOutline(sebesseg[playerid], 1);
TextDrawSetProportional(sebesseg[playerid], 1);
TextDrawSetShadow(sebesseg[playerid], 1);
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
return 1;
}
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
public OnPlayerExitVehicle(playerid, vehicleid)
{
PlayerTextDrawDestroy(playerid, sebesseg[playerid]);
return 1;
}
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
PlayerTextDrawShow(playerid, sebesseg[playerid]);
return 1;
}
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
public OnPlayerUpdate(playerid)
{
new kmh = GetPlayerSpeed(playerid, true);
new string[64];
//Sebesseg>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
format(string, sizeof(string), \"Sebességed: %d km/h\",kmh );
PlayerTextDrawSetString(playerid, sebesseg[playerid], string);
return 1;
}
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
stock GetPlayerSpeed(playerid,bool:kmh)
{
new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz);
rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

 
Errorok:
 
C:\\Documents and Settings\\XPPRESP3\\Desktop\\km.pwn(12) : error 017: undefined symbol \"playerid\"
C:\\Documents and Settings\\XPPRESP3\\Desktop\\km.pwn(12) : warning 213: tag mismatch
C:\\Documents and Settings\\XPPRESP3\\Desktop\\km.pwn(13) : error 017: undefined symbol \"playerid\"
C:\\Documents and Settings\\XPPRESP3\\Desktop\\km.pwn(14) : error 017: undefined symbol \"playerid\"
C:\\Documents and Settings\\XPPRESP3\\Desktop\\km.pwn(15) : error 017: undefined symbol \"playerid\"
C:\\Documents and Settings\\XPPRESP3\\Desktop\\km.pwn(16) : error 017: undefined symbol \"playerid\"
C:\\Documents and Settings\\XPPRESP3\\Desktop\\km.pwn(17) : error 017: undefined symbol \"playerid\"
C:\\Documents and Settings\\XPPRESP3\\Desktop\\km.pwn(18) : error 017: undefined symbol \"playerid\"
C:\\Documents and Settings\\XPPRESP3\\Desktop\\km.pwn(19) : error 017: undefined symbol \"playerid\"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
8 Errors.
« Utoljára szerkesztve: 2012. október 19. - 13:42:03 írta [SDW]BlackJack »

Errorok
« Válasz #1 Dátum: 2012. október 19. - 14:01:17 »
+1 Show voters
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#include <a_samp>
#include <fixchars.h>
new PlayerText:sebesseg;
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
public OnPlayerConnect(playerid)
{
sebesseg = CreatePlayerTextDraw(playerid, 240.000000, 380.000000, \"Sebesség:\");
PlayerTextDrawBackgroundColor(playerid, sebesseg, 255);
PlayerTextDrawFont(playerid, sebesseg, 1);
PlayerTextDrawLetterSize(playerid, sebesseg, 0.500000, 1.500000);
PlayerTextDrawColor(playerid, sebesseg, 0xFFFF00FF);
PlayerTextDrawSetOutline(playerid, sebesseg, 1);
PlayerTextDrawSetProportional(playerid, sebesseg, 1);
PlayerTextDrawSetShadow(playerid, sebesseg, 1);
return 1;
}
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
public OnPlayerExitVehicle(playerid, vehicleid)
{
PlayerTextDrawDestroy(playerid, sebesseg);
return 1;
}
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
PlayerTextDrawShow(playerid, sebesseg);
return 1;
}
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
public OnPlayerUpdate(playerid)
{
new string[64];
format(string, sizeof(string), \"Sebességed: %d km/h\", GetPlayerSpeed(playerid, true));
PlayerTextDrawSetString(playerid, sebesseg, string);
return 1;
}
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
stock GetPlayerSpeed(playerid,bool:kmh)
{
new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz);
rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

 
egyébként.. GetPlayerSpeed függvény írójának neve?

Errorok
« Válasz #2 Dátum: 2012. október 19. - 14:12:35 »
0 Show voters
Thx!kmh vagy mire gondolsz?

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal