Szerző Téma: Mi lehet a hiba?  (Megtekintve 1431 alkalommal)

Nem elérhető grove4l

  • 1545
    • Profil megtekintése
Mi lehet a hiba?
« Dátum: 2010. december 12. - 18:59:38 »
0 Show voters
PWN:
 
#include <a_samp>
#include <core>
#include <float>
#pragma tabsize 0
#define GROVE_STREET 1
#define POLICE 2
#define GROVE_STREET_COLOUR 0x00820FAA
#define POLICE_COLOUR 0x003DF5AA
new gTeam[MAX_PLAYERS];
main()
{
print(\"\\n----------------------------------\");
print(\"  Bare Script\\n\");
print(\"----------------------------------\\n\");
}
public OnPlayerConnect(playerid)
{
GameTextForPlayer(playerid,\"~w~SA-MP: ~r~Bare Script\",5000,5);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new idx;
new cmd[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, \"/yadayada\", true) == 0) {
       return 1;
}
return 0;
}
public OnPlayerSpawn(playerid)
{
SetPlayerToTeamColour(playerid)
{
    if(gTeam[playerid] == GROVE_STREET)
    {
        SetPlayerColor(playerid,GROVE_STREET_COLOUR); //Green
    }
    if(gTeam[playerid] == POLICE)
    {
        SetPlayerColor(playerid,POLICE_COLOUR); // Blue
    }
}
public OnPlayerDeath(playerid, killerid, reason)
{
      return 1;
}
SetupPlayerForClassSelection(playerid)
{
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid)
{
    if(classid == 0)
    {
        gTeam[playerid] = GROVE_STREET;
    }
    if(classid == 1)
    {
        gTeam[playerid] = POLICE;
    }
public OnGameModeInit()
{
SetGameModeText(\"[HUN] Police Mod\");
ShowPlayerMarkers(1);
ShowNameTags(1);
AllowAdminTeleport(1);
AddPlayerClass(105,2497.2693,-1676.9578,13.3398,23.6501,0,0,0,0,0,0); //Grove Street Gang Member (0)
AddPlayerClass(280,1544.0514,-1675.7766,13.5577,98.0974,0,0,0,0,0,0); //Police Officer (1)
AddStaticVehicle(596,1535.9954,-1678.1025,13.1029,0.2147,1,0); //
AddStaticVehicle(596,1535.9640,-1669.5818,13.0989,0.2146,1,0); //
return 1;
}
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= \' \'))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > \' \') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}[/quote]
Vége:
Idézet
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(30) : error 017: undefined symbol \"strtok\"
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(30) : error 033: array must be indexed (variable \"cmd\")
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(27) : warning 203: symbol is never used: \"idx\"
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(41) : error 017: undefined symbol \"SetPlayerToTeamColour\"
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(52) : error 029: invalid expression, assumed zero
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(52) : error 004: function \"OnPlayerDeath\" is not implemented
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(54) : error 079: inconsistent return types (array & non-array)
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(57) : warning 225: unreachable code
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(57) : error 017: undefined symbol \"SetupPlayerForClassSelection\"
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(66) : error 029: invalid expression, assumed zero
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(66) : error 004: function \"OnPlayerRequestClass\" is not implemented
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(68) : error 017: undefined symbol \"SetPlayerTeamFromClass\"
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(70) : error 017: undefined symbol \"classid\"
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(74) : error 017: undefined symbol \"classid\"
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(78) : error 029: invalid expression, assumed zero
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(78) : error 004: function \"OnGameModeInit\" is not implemented
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(89) : error 079: inconsistent return types (array & non-array)
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(92) : warning 225: unreachable code
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(92) : error 017: undefined symbol \"strtok\"
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(92) : error 029: invalid expression, assumed zero
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(92) : error 017: undefined symbol \"string\"
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(92) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
19 Errors.

 
ChuckNorris: Ne idézz,hanem a code tageket használd!
« Utoljára szerkesztve: 2010. december 12. - 20:15:12 írta ChuckNorris »

Nem elérhető Csabesz

  • 7827
    • Profil megtekintése
Mi lehet a hiba?
« Válasz #1 Dátum: 2010. december 12. - 19:22:33 »
0 Show voters
De ronda!!!!!! :@
1. Igényesség hol van?  :o
    Töröld ahogy van, a szkriptelést meg felejtsd el, ha nem tudsz igényesen dolgozni !!
2. Ne idézetbe tedd!
Ja és,
 

public OnPlayerSpawn(playerid)
{
    if(gTeam[playerid] == GROVE_STREET) return SetPlayerColor(playerid,GROVE_STREET_COLOUR); //Green
    if(gTeam[playerid] == POLICE) return SetPlayerColor(playerid,POLICE_COLOUR); // Blue
    return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
      return 1;
}
SetupPlayerForClassSelection(playerid)
{
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
    SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerTeamFromClass(playerid, classid);
    if(classid == 0) return gTeam[playerid] = GROVE_STREET;
    if(classid == 1) return gTeam[playerid] = POLICE;
    return 1;
}
« Utoljára szerkesztve: 2010. december 12. - 19:25:01 írta Roniii »

Nem elérhető Iceaac

  • 2187
    • Profil megtekintése
Mi lehet a hiba?
« Válasz #2 Dátum: 2010. december 12. - 19:42:58 »
0 Show voters
Másolta, gondolom GFbõl, ezért ronda.

Nem elérhető grove4l

  • 1545
    • Profil megtekintése
Mi lehet a hiba?
« Válasz #3 Dátum: 2010. december 12. - 20:12:20 »
0 Show voters
Semit se másoltam
Ez egy Alap Bare mód hozzá Caspatot raktam [TUT] fájlból

Nem elérhető grove4l

  • 1545
    • Profil megtekintése
Mi lehet a hiba?
« Válasz #4 Dátum: 2010. december 12. - 20:13:56 »
0 Show voters
Beraktam és ez jött
 
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(61) : error 017: undefined symbol \"SetPlayerTeamFromClass\"
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(99) : warning 203: symbol is never used: \"SetupPlayerForClassSelection\"
Pawn compiler 3.2.3664           Copyright © 1997-2006, ITB CompuPhase
 
[/quote]

Nem elérhető Stray

  • 617
    • Profil megtekintése
Mi lehet a hiba?
« Válasz #5 Dátum: 2010. december 12. - 20:43:37 »
0 Show voters
Idézetet írta: grove4l date=1292181236\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"4614\" data-ipsquote-contentclass=\"forums_Topic
Beraktam és ez jött
 
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(61) : error 017: undefined symbol \"SetPlayerTeamFromClass\"
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(99) : warning 203: symbol is never used: \"SetupPlayerForClassSelection\"
Pawn compiler 3.2.3664           Copyright © 1997-2006, ITB CompuPhase
 

[/quote]
open Gf.. ctrl+c, ctrl+v..

Nem elérhető Csabesz

  • 7827
    • Profil megtekintése
Mi lehet a hiba?
« Válasz #6 Dátum: 2010. december 12. - 20:53:52 »
0 Show voters
Idézetet írta: grove4l date=1292181236\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"4614\" data-ipsquote-contentclass=\"forums_Topic
Beraktam és ez jött
 
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(61) : error 017: undefined symbol \"SetPlayerTeamFromClass\"
D:\\Documents and Settings\\Jake Sully\\Asztal\\SA-MP 0.3C RC4\\gamemodes\\bare.pwn(99) : warning 203: symbol is never used: \"SetupPlayerForClassSelection\"
Pawn compiler 3.2.3664           Copyright © 1997-2006, ITB CompuPhase
 

[/quote]
A Te kódodba nem volt a SetPlayerTeamFromClass függvény ezért ír rá hibát.
A SetPlayerTeamFromClass függvényt pedig nem tudja elérni a pawno.
Próbáld így ( ez hibátlan ):
 

public OnPlayerSpawn(playerid)
{
    if(gTeam[playerid] == GROVE_STREET) return SetPlayerColor(playerid,GROVE_STREET_COLOUR); //Green
    if(gTeam[playerid] == POLICE) return SetPlayerColor(playerid,POLICE_COLOUR); // Blue
    return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
      return 1;
}
SetupPlayerForClassSelection(playerid)
{
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
    SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}
public OnPlayerRequestClass(playerid, classid)
{
    SetupPlayerForClassSelection(playerid, classid);
    if(classid == 0) return gTeam[playerid] = GROVE_STREET;
    if(classid == 1) return gTeam[playerid] = POLICE;
    return 1;
}

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal