Jump to content

[TUT || GMM]Basic Script


Flame^

Recommended Posts

C:\Documents and Settings\R. de Roos\Bureaublad\spellen\gta\sa mp server maken\gamemodes\Gang Battle.pwn(49) : warning 217: loose indentation
De uitlijning klopt niet. Na een { spring je altijd 1 tab/4 spaties in, na een } ga je 1 tab/4 spaties terug.
C:\Documents and Settings\R. de Roos\Bureaublad\spellen\gta\sa mp server maken\gamemodes\Gang Battle.pwn(49) : error 029: invalid expression, assumed zero
Fout met een variabele, deze wordt niet herkend. Ontstaat vaak na error 017: 'undefined symbol'
C:\Documents and Settings\R. de Roos\Bureaublad\spellen\gta\sa mp server maken\gamemodes\Gang Battle.pwn(49) : error 017: undefined symbol "Ballas"
Hier heb je 'undefined symbol' al. In dit geval heb je 'Ballas' nergens gedefiniëerd. Zet bovenaan je gamemode:

new Ballas;

C:\Documents and Settings\R. de Roos\Bureaublad\spellen\gta\sa mp server maken\gamemodes\Gang Battle.pwn(49) : error 017: undefined symbol "vs"
Nog een variabele die niet is gedefiniëerd, zet dit bovenaan je gamemode:

new vs;

C:\Documents and Settings\R. de Roos\Bureaublad\spellen\gta\sa mp server maken\gamemodes\Gang Battle.pwn(49) : fatal error 107: too many error messages on one line
Als er meer dan 3 errors op één regel zitten ontstaat automatisch error 107, als je de andere errors oplost verdwijnt deze error ook.

Succes! :)

Link to comment
Delen op andere websites

  • Reacties 37
  • Created
  • Laatste reactie

Top Posters In This Topic

  • mosweg

    6

  • Gangstaz

    3

  • Morph1

    3

  • r.deroos

    2

eey bedankt voor je tip.

nu ben ik begonnen aan een andere maar dan krijg ik dit

C:\Documents and Settings\R. de Roos\Bureaublad\spellen\gta\sa mp server maken\gamemodes\los santos gangwar[NL].pwn(59) : warning 217: loose indentation

C:\Documents and Settings\R. de Roos\Bureaublad\spellen\gta\sa mp server maken\gamemodes\los santos gangwar[NL].pwn(59) : error 029: invalid expression, assumed zero

C:\Documents and Settings\R. de Roos\Bureaublad\spellen\gta\sa mp server maken\gamemodes\los santos gangwar[NL].pwn(59) : warning 215: expression has no effect

C:\Documents and Settings\R. de Roos\Bureaublad\spellen\gta\sa mp server maken\gamemodes\los santos gangwar[NL].pwn(59) : error 001: expected token: ";", but found "-identifier-"

C:\Documents and Settings\R. de Roos\Bureaublad\spellen\gta\sa mp server maken\gamemodes\los santos gangwar[NL].pwn(59) : warning 215: expression has no effect

C:\Documents and Settings\R. de Roos\Bureaublad\spellen\gta\sa mp server maken\gamemodes\los santos gangwar[NL].pwn(59) : error 001: expected token: ";", but found "-identifier-"

weet iemand wat ik fout doe?? ik ben namelijk beginnner

Respect man!

ik

Link to comment
Delen op andere websites

eey bedankt voor je tip.

nu ben ik begonnen aan een andere maar dan krijg ik dit

C:\Documents and Settings\R. de Roos\Bureaublad\spellen\gta\sa mp server maken\gamemodes\los santos gangwar[NL].pwn(59) : warning 217: loose indentation

C:\Documents and Settings\R. de Roos\Bureaublad\spellen\gta\sa mp server maken\gamemodes\los santos gangwar[NL].pwn(59) : error 029: invalid expression, assumed zero

C:\Documents and Settings\R. de Roos\Bureaublad\spellen\gta\sa mp server maken\gamemodes\los santos gangwar[NL].pwn(59) : warning 215: expression has no effect

C:\Documents and Settings\R. de Roos\Bureaublad\spellen\gta\sa mp server maken\gamemodes\los santos gangwar[NL].pwn(59) : error 001: expected token: ";", but found "-identifier-"

C:\Documents and Settings\R. de Roos\Bureaublad\spellen\gta\sa mp server maken\gamemodes\los santos gangwar[NL].pwn(59) : warning 215: expression has no effect

C:\Documents and Settings\R. de Roos\Bureaublad\spellen\gta\sa mp server maken\gamemodes\los santos gangwar[NL].pwn(59) : error 001: expected token: ";", but found "-identifier-"

weet iemand wat ik fout doe?? ik ben namelijk beginnner

Respect man!

ik

Uitlijnen, een ; vergeten

Link to comment
Delen op andere websites

  • 1 maand later...

ik heb ook een probleempje met mijn script ik heb dit hieruit deze tut gepakt:

public SetPlayerTeamFromClass(playerid,classid)

{
if(classid == 0 || classid == 1 || classid == 2) {
	gTeam[playerid] = TEAM_GROVE;
} if(classid == 3 || classid == 4 || classid == 5) {
	gTeam[playerid] = TEAM_BALLAS;
} if(classid == 6 || classid == 7 || classid == 8) {
	gTeam[playerid] = TEAM_VAGOS;
} if(classid == 9 || classid == 10 || classid == 11) {
	gTeam[playerid] = TEAM_AZTECAS;
}
}
//-------------------------------------

public SetPlayerToTeamColor(playerid)
{
if(gTeam[playerid] == TEAM_VAGOS) {
	SetPlayerColor(playerid,COLOR_YELLOW); // geel
} if(gTeam[playerid] == TEAM_BALLAS) {
	SetPlayerColor(playerid,COLOR_PINK); // roze/paars
} if(gTeam[playerid] == TEAM_GROVE)  {
	SetPlayerColor(playerid,COLOR_GREEN);
} if(gTeam[playerid] == TEAM_AZTECAS){
	SetPlayerColor(playerid,COLOR_ORANGE);
}
}

Maar de colors werken nog steeds niet >_<

Link to comment
Delen op andere websites

  • 2 weken later...
  • 1 maand later...

bij mij werken de colors ook nie, ik krijg errors:

public SetPlayerToTeamColor(playerid)
{
if(gTeam[playerid] == TEAM_POLITIE) {
	SetPlayerColor(playerid,COLOR_BLUE); // blauw
} else if(gTeam[playerid] == TEAM_FBI) {
	SetPlayerColor(playerid,COLOR_BLUE); // blauw
} else if(gTeam[playerid] == TEAM_SWAT) {
	SetPlayerColor(playerid,COLOR_BLUE); // blauw
} else if(gTeam[playerid] == TEAM_MAFIA) {
	SetPlayerColor(playerid,COLOR_RED); // rood
} else if(gTeam[playerid] == TEAM_MECHANICS) {
	SetPlayerColor(playerid,COLOR_GREEN); // GROEN
} else if(gTeam[playerid] == TEAM_MEDIC) {
	SetPlayerColor(playerid,COLOR_YELLOW); // geel
} else if(gTeam[playerid] == TEAM_CIVILIANS) {
	SetPlayerColor(playerid,COLOR_WHITE); // wit
} 
}

errors:

D:\Games\SAMP-server\pawno\server.pwn(246) : error 029: invalid expression, assumed zero

D:\Games\SAMP-server\pawno\server.pwn(248) : error 029: invalid expression, assumed zero

D:\Games\SAMP-server\pawno\server.pwn(252) : error 029: invalid expression, assumed zero

D:\Games\SAMP-server\pawno\server.pwn(254) : error 029: invalid expression, assumed zero

D:\Games\SAMP-server\pawno\server.pwn(256) : error 029: invalid expression, assumed zero

hellup :cya:

Link to comment
Delen op andere websites

  • 10 maanden later...

ik heb het ook geprobeert, alleen al met mijn eigen jongeren tegen smerissen, maar ik kreeg 9 errors en een aantal waarschuwingen :

(85) : warning 225: unreachable code

(85) : warning 217: loose indentation

(85) : error 029: invalid expression, assumed zero

(85) : error 004: function "SetupPlayerForClassSelection" is not implemented

(89) : warning 217: loose indentation(90) : warning 217: loose indentation

(94) : error 029: invalid expression, assumed zero

(94) : error 004: function "SetPlayerTeamFromClass" is not implemented

(96) : error 017: undefined symbol "classid"

(97) : error 017: undefined symbol "gTeam"

(97) : warning 215: expression has no effect

(97) : error 001: expected token: ";", but found "]"

(97) : error 029: invalid expression, assumed zero

(97) : fatal error 107: too many error messages on one line

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

9 Errors.

kan iemand mijn script misch. ff fixen want ik heb geen flauw iedee wat er mis is:

#include <a_samp>

#include <float>

#include <core>

#define TEAM_JONGEREN 1 // Team jongeren

#define TEAM_SMERISEN 2 // Team smerisen

#define COLOR_GREEN 0x32CD32AA // Kleur jongeren

#define COLOR_BLUE 0x0000CDAA // Kleur smerisen

#define COLOR_GREY 0xAFAFAFAA // Kleur wanneer je inactive bent

//------------------------------------------------------------------------------

forward SetPlayerToTeamColor(playerid); // Speler naar teamkleur zetten

forward SetupPlayerForClassSelection(playerid); // Speler klaarmaken voor setup

forward SetPlayerTeamFromClass(playerid,classid); // Speler in team zetten

forward ExitTheGameMode(); // uit gamemode gaan

//------------------------------------------------------------------------------

public OnGameModeInit()

{

// Don't use these lines if it's a filterscript

SetGameModeText("Airwar");

AddPlayerClass(67,1660.312,-2402.307,13.55469,134.7722,28,500,37,250,5,0); // jongeren 1

AddPlayerClass(115,1660.312,-2402.307,13.55469,134.7722,28,500,37,250,5,0);// jongeren 1

AddPlayerClass(170,1660.312,-2402.307,13.55469,134.7722,28,500,37,250,5,0); // jongeren 1

AddPlayerClass(280,1645.818,-2675.571,13.54688,330.6429,22,250,23,250,25,100); // smeris

AddPlayerClass(281,1645.818,-2675.571,13.54688,330.6429,22,250,23,250,25,100); // smeris

AddPlayerClass(284,1645.818,-2675.571,13.54688,330.6429,22,250,23,250,25,100); // smeris

AddStaticVehicle(476,1796.8372,-2476.2964,14.2673,178.3301,89,91); //

AddStaticVehicle(476,1783.2672,-2476.2642,14.2623,181.1099,103,102); //

AddStaticVehicle(476,1771.3412,-2476.3823,14.2729,178.8508,71,77); //

AddStaticVehicle(476,1758.2069,-2476.7354,14.2697,178.8175,7,6); //

AddStaticVehicle(476,1746.1855,-2476.2761,14.2965,179.9581,71,77); //

AddStaticVehicle(476,1734.3160,-2476.1763,14.2642,178.8368,7,6); //

AddStaticVehicle(476,1722.0498,-2476.4106,14.2737,179.8360,71,77); //

AddStaticVehicle(476,1709.5515,-2476.3210,14.2809,182.0177,7,6); //

AddStaticVehicle(476,1696.7780,-2476.3201,14.2612,180.0188,71,77); //

AddStaticVehicle(476,1685.2684,-2476.1899,14.2658,179.4795,89,91); //

AddStaticVehicle(476,1672.4994,-2475.9961,14.2651,176.1573,7,6); //

AddStaticVehicle(476,1660.0139,-2476.0527,14.2938,180.8458,71,77); //

AddStaticVehicle(476,1647.6143,-2476.6177,14.2657,182.1340,89,91); //

AddStaticVehicle(476,1636.1099,-2476.5342,14.2624,179.2340,7,6); //

AddStaticVehicle(577,1433.3184,-2493.7463,13.4710,270.0286,8,10); //

AddStaticVehicle(485,1448.1206,-2570.5955,13.2040,188.0168,1,77); //

AddStaticVehicle(476,1543.5247,-2611.1943,14.2495,355.4034,6,7); //

AddStaticVehicle(476,1557.3591,-2610.9236,14.2507,0.0384,89,91); //

AddStaticVehicle(476,1570.4740,-2611.2544,14.2735,1.3837,103,102); //

AddStaticVehicle(476,1582.1486,-2611.1697,14.2573,1.8149,71,77); //

AddStaticVehicle(476,1596.1619,-2611.3086,14.2503,359.9931,7,6); //

AddStaticVehicle(476,1609.3242,-2611.1287,14.2523,357.7919,89,91); //

AddStaticVehicle(476,1622.7618,-2611.5640,14.2722,3.9697,103,102); //

AddStaticVehicle(476,1637.1892,-2611.2649,14.2527,357.1283,71,77); //

AddStaticVehicle(476,1650.5060,-2611.2571,14.2499,359.6149,7,6); //

AddStaticVehicle(476,1662.8473,-2611.1250,14.2710,0.8926,89,91); //

AddStaticVehicle(476,1675.7589,-2610.9846,14.2561,0.7057,103,102); //

AddStaticVehicle(476,1688.6541,-2611.4038,14.2525,358.5987,71,77); //

AddStaticVehicle(476,1702.0942,-2612.0305,14.2632,359.5744,7,6); //

AddStaticVehicle(476,1715.8359,-2612.0088,14.2420,356.4739,89,91); //

AddStaticVehicle(497,1943.3289,-2645.4976,13.7244,0.0011,0,1); //

AddStaticVehicle(497,1956.4980,-2644.9470,13.7237,0.6498,0,1); //

AddStaticVehicle(564,1969.6356,-2468.0806,12.7085,185.7075,0,0); //

AddStaticVehicle(564,1964.7548,-2468.0852,12.7085,186.1145,0,0); //

AddStaticVehicle(564,1959.8259,-2468.7590,12.7085,187.1175,0,0); //

AddStaticVehicle(583,2061.5159,-2431.3315,13.0874,131.8745,1,1); //

AddStaticVehicle(594,1666.8236,-2419.0300,12.7390,201.2130,0,0); //

AddStaticVehicle(607,1496.3966,-2430.9326,13.6093,163.2427,0,0); //

AddStaticVehicle(485,1454.7504,-2465.1226,13.2076,182.7222,1,79); //

AddStaticVehicle(606,1556.2045,-2641.1638,13.5993,137.5406,0,0); //

AddStaticVehicle(606,1649.6750,-2542.9236,17.2856,269.0840,0,0); //

AddStaticVehicle(606,1649.6942,-2533.4072,17.2846,270.3615,0,0); //

AddStaticVehicle(606,1650.0625,-2553.0283,17.2858,270.5369,0,0); //

AddStaticVehicle(425,1957.4086,-2196.6865,14.1190,272.3766,43,0); //

AddStaticVehicle(577,1445.9379,-2594.9373,13.4629,270.9230,8,16); // groot vliegtuig

AddStaticVehicle(608,1454.7676,-2537.7104,14.0783,358.7568,1,1); // trappetje

AddStaticVehicle(608,1458.4314,-2439.8789,14.0876,0.0000,1,1); // trappetje2

return 1;

}

//------------------------------------------------------------------------------

public OnPlayerConnect(playerid)

{

SetPlayerColor(playerid,COLOR_GREY); // Kleur

GameTextForPlayer(playerid,"~g~jongeren ~w~vs ~b~smerissen!",2000,5); // Text

return 1;

//------------------------------------------------------------------------------

public SetupPlayerForClassSelection(playerid)

{

SetPlayerInterior(playerid,11);

SetPlayerPos(playerid,1660.312,-2402.307,13.55469);

SetPlayerCameraPos(playerid,1660.312,-2402.307,13.55469);

SetPlayerCameraLookAt(playerid,1660.312,-2406.307,13.55469);

SetPlayerFacingAngle(playerid,0.0);

}

//------------------------------------------------------------------------------

public SetPlayerTeamFromClass(playerid,classid)

{

if(classid == 67 || classid == 115 || classid == 170) {

gTeam[playerid] = TEAM_JONGEREN;

} else if(classid == 280 || classid == 281 || classid == 284) {

gTeam[playerid] = TEAM_SMERISSEN;

}

}

//------------------------------------------------------------------------------

public SetPlayerToTeamColor(playerid)

{

if(gTeam[playerid] == TEAM_JONGEREN) {

SetPlayerColor(playerid,COLOR_GREEN); // geel

} else if(gTeam[playerid] == TEAM_SMERISSEN) {

SetPlayerColor(playerid,COLOR_BLUE); // roze/paars

}

}

//------------------------------------------------------------------------------

public OnPlayerRequestClass(playerid, classid)

{

SetupPlayerForClassSelection(playerid);

SetPlayerTeamFromClass(playerid,classid);

if(classid == 0 || classid == 1 || classid == 2) {

GameTextForPlayer(playerid,"~g~Jongeren",1000,5);

} else if(classid == 3 || classid == 4 || classid == 5) {

GameTextForPlayer(playerid,”~b~Smerissen",1000,5);

}

return 1;

}

//------------------------------------------------------------------------------

public OnPlayerSpawn(playerid)

{

SetPlayerToTeamColor(playerid);

SetPlayerInterior(playerid,0);

if(gTeam[playerid] == TEAM_Jongeren) {

GameTextForPlayer(playerid,

"vermoord zoveel mogelijk ~b~Smerissen. maak gebruik van de vliegtuigen!"

6000,5);

}

else if(gTeam[playerid] == TEAM_Smerissen) {

GameTextForPlayer(playerid,

"vermoord zoveel mogelijk ~g~Jongeren, maak gebruik van de vliegtuigen!"

6000,5);

}

return 1;

}

//------------------------------------------------------------------------------

public ExitTheGameMode()

{

GameModeExit();

}

//------------------------------------------------------------------------------

public OnPlayerDeath(playerid, killerid, reason)

{

new deathstr[256];

new whodiedname[MAX_PLAYER_NAME+1];

new whokilledname[MAX_PLAYER_NAME+1];

new deathreasonstr[256];

GetPlayerName(playerid,whodiedname,MAX_PLAYER_NAME);

GetWeaponName(reason,deathreasonstr,255);

if(killerid == INVALID_PLAYER_ID) {

if(strlen(deathreasonstr)) {

format(deathstr,256,"%s died (%s)",whodiedname,deathreasonstr);

} else {

format(deathstr,256,"%s died",whodiedname);

}

SendClientMessageToAll(OBJECTIVE_COLOR, deathstr);

} else {

GetPlayerName(killerid,whokilledname,MAX_PLAYER_NAME);

if(gTeam[killerid] != gTeam[playerid]) {

// Valid kill

if(strlen(deathreasonstr)) {

format(deathstr,256,"%s was killed by %s (%s)",whodiedname,whokilledname,deathreasonstr);

} else {

format(deathstr,256,"%s was killed by %s",whodiedname,whokilledname);

}

SendClientMessageToAll(OBJECTIVE_COLOR, deathstr);

SetPlayerScore(killerid,GetPlayerScore(killerid)+1);

}

else {

// Team kill

format(deathstr,256,"%s killed team-mate %s (%s)",whokilledname,whodiedname,deathreasonstr);

SendClientMessageToAll(OBJECTIVE_COLOR, deathstr);

}

}

return 1;

}

voor degene die dit wil fixen echt heel erg bedankt.

Link to comment
Delen op andere websites

public SetPlayerTeamFromClass(playerid,classid)
{
if(classid == 67 || classid == 115 || classid == 170) 
{
gTeam[playerid] = TEAM_JONGEREN;
} 

else if(classid == 280 || classid == 281 || classid == 284) 
{
gTeam[playerid] = TEAM_SMERISSEN;
}
}

Moet volgens mij worden:

public SetPlayerTeamFromClass(playerid,classid)
{
if(classid == 0 || classid == 1 || classid == 2) 
{
gTeam[playerid] = TEAM_JONGEREN;
} 

else if(classid == 3 || classid ==4 || classid == 5) 
{
gTeam[playerid] = TEAM_SMERISSEN;
}
}

Bewerkt: door Basssss
Link to comment
Delen op andere websites

de meeste errors zitten in dit stuk:

public SetPlayerTeamFromClass(playerid,classid)

{

if(classid == 0 || classid == 1 || classid == 2) {

gTeam[playerid] = JONGEREN;

} else if(classid == 3 || classid == 4 || classid == 5) {

gTeam[playerid] = SMERISSEN;

}

}

dit zijn de errors, en die zijn het zelfde als bij lijn 103 (101 en 103 rood gekleurd)

(101) : error 028: invalid subscript (not an array or too many subscripts): "gTeam"

(101) : warning 215: expression has no effect

(101) : error 001: expected token: ";", but found "]"

(101) : error 029: invalid expression, assumed zero

(101) : fatal error 107: too many error messages on one line

Link to comment
Delen op andere websites

  • 2 weken later...

Ik krijg dit te zien:

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(36) : error 029: invalid expression, assumed zero

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(36) : error 017: undefined symbol "Ballas"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(36) : error 017: undefined symbol "vs"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(36) : fatal error 107: too many error messages on one line

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

4 Errors.

als ik dan new Ballas; en new vs; doe dan krijg ik:

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(37) : error 029: invalid expression, assumed zero

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(37) : warning 215: expression has no effect

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(37) : error 001: expected token: ";", but found "-identifier-"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(37) : warning 215: expression has no effect

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(37) : error 001: expected token: ";", but found "-identifier-"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(37) : fatal error 107: too many error messages on one line

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

4 Errors.

hoe los ik dit op?

Link to comment
Delen op andere websites

Voor dat iemand je uberhout kan helpen moet je toch eerst het deel waar de fout in zit of heel je script posten.

Anders kunnen we 't niet zien

Edit: 1 ding kan je proberen heb je mischien al paar fouten weg

bovenaan staat dit in de tutorial.

#define TEAM_VAGOS 1 // Team Vagos

#define TEAM_BALLAS 2 // Team Ballas

dan moet je dat ook met jou script doen bijv

#define TEAM_VS 1 // Team VS

#define TEAM_BALLAS 2 // Team Ballas

Bewerkt: door qum
Link to comment
Delen op andere websites

dit is die regel 38:

SetGameModeText(“Ballas vs Vagos”);

ik heb verder niks veranderd:

#include <a_samp>
#include <float>
#include <core>


// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#define TEAM_VAGOS 1 // Team Vagos
#define TEAM_BALLAS 2 // Team Ballas

#define COLOR_YELLOW 0xFFFF00AA // Kleur Vagos
#define COLOR_PINK 0xFF66FFAA // Kleur Ballas
#define COLOR_GREY 0xAFAFAFAA // Kleur wanneer je inactive bent


static gTeam[MAX_PLAYERS];

forward SetPlayerToTeamColor(playerid); // Speler naar teamkleur zetten
forward SetupPlayerForClassSelection(playerid); // Speler klaarmaken voor setup
forward SetPlayerTeamFromClass(playerid,classid); // Speler in team zetten
forward ExitTheGameMode(); // uit gamemode gaan

main()
{
print("\n----------------------------------");
print("  (Ballas vs Vagos by [QB]Flame\n");
print("----------------------------------\n");
}

//--------------------------------------------------------------------------
new Ballas;
new vs;

public OnGameModeInit()
{
SetGameModeText(“Ballas vs Vagos”);
		SetWorldTime(6); // tijd in uren.
		ShowNameTags(1); // Spelers namen boven health balk aan of uit. Nu aan
		ShowPlayerMarkers(1); // Blokjes op radar aan of uit? Nu aan

		// Vehicles Vagos ---------- Zet hier de autos van de Vagos neer
AddStaticVehicle(411,1990.5304,-1274.8484,23.5474,179.9483,123,1); //1
AddStaticVehicle(451,1978.9088,-1275.0537,23.5267,180.5944,18,18); //1
AddStaticVehicle(461,2022.3484,-1272.8076,23.5686,2.8655,53,1); //1
AddStaticVehicle(461,2019.7675,-1272.8455,23.5702,356.3444,53,1); //1
		// Vehicles Ballas ---------- Zet hier de autos van de Ballas neer
AddStaticVehicle(461,2255.7495,-1421.4042,23.6214,172.2777,53,1); //2
AddStaticVehicle(461,2240.9497,-1423.4565,23.6522,19.2248,53,1); //2
AddStaticVehicle(490,2235.6836,-1425.1844,24.3253,1.4257,0,0); //2
AddStaticVehicle(490,2256.9307,-1424.6719,24.3007,359.5161,0,0); //2
		// Vagos Class ------------ Zet hier de classes van de vagos neer waaruit je kan kiezen
AddPlayerClass(3,1995.4502,-1269.2792,23.9844,4.8686,0,0,0,0,0,0); // 1 1
AddPlayerClass(4,1998.8303,-1270.4124,23.9844,2.6753,0,0,0,0,0,0); // 1 2
AddPlayerClass(5,1992.7712,-1270.2063,23.9844,2.6753,0,0,0,0,0,0); // 1 3
		// Ballas Class ----------- Ze hier de classes van de ballas neer waaruit je kan kiezen
AddPlayerClass(0,2246.5210,-1410.8179,24.0000,191.1392,0,0,0,0,0,0); // 2 1
AddPlayerClass(1,2253.0173,-1409.9825,25.0887,190.1992,0,0,0,0,0,0); // 2 2
AddPlayerClass(2,2249.9221,-1422.5824,24.0696,8.4641,0,0,0,0,0,0); // 2 3
{

return 1;
}

//----------------------------------------------------------------------------

public OnPlayerConnect(playerid)
{
SetPlayerColor(playerid,COLOR_GREY); // Kleur
GameTextForPlayer(playerid,"~r~Ballas ~w~vs ~y~Vagos!",2000,5); // Text
return 1;
}
//----------------------------------------------------------------------------

public SetupPlayerForClassSelection(playerid)
{
SetPlayerInterior(playerid,11);
SetPlayerPos(playerid,508.7362,-87.4335,998.9609);
		SetPlayerCameraPos(playerid,508.7362,-83.4335,998.9609);
SetPlayerCameraLookAt(playerid,508.7362,-87.4335,998.9609);
SetPlayerFacingAngle(playerid,0.0);
}
//----------------------------------------------------------------------------
public SetPlayerTeamFromClass(playerid,classid)
{
if(classid == 0 || classid == 1 || classid == 2) {
	gTeam[playerid] = TEAM_VAGOS;
} else if(classid == 3 || classid == 4 || classid == 5) {
	gTeam[playerid] = TEAM_BALLAS;
}
}
//----------------------------------------------------------------------------
public SetPlayerToTeamColor(playerid)
{
if(gTeam[playerid] == TEAM_VAGOS) {
	SetPlayerColor(playerid,COLOR_YELLOW); // geel
} else if(gTeam[playerid] == TEAM_BALLAS) {
	SetPlayerColor(playerid,COLOR_PINK); // roze/paars
}
}
//----------------------------------------------------------------------------

public OnPlayerRequestClass(playerid, classid)
{
SetupPlayerForClassSelection(playerid);
SetPlayerTeamFromClass(playerid,classid);

if(classid == 0 || classid == 1 || classid == 2) {
	GameTextForPlayer(playerid,"~y~VAGOS",1000,5);
} else if(classid == 3 || classid == 4 || classid == 5) {
	GameTextForPlayer(playerid,”~r~BALLAS",1000,5);
}

return 1;
}
//----------------------------------------------------------------------------
public OnPlayerSpawn(playerid)
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid,0);

if(gTeam[playerid] == TEAM_VAGOS) {
	SetPlayerWorldBounds(playerid,x_max, x_min, y_max, y_min);
	GameTextForPlayer(playerid,
	   "Kill the ~r~Ballas!"
	   6000,5);
}
else if(gTeam[playerid] == TEAM_BALLAS) {
			SetPlayerWorldBounds(playerid,x_max, x_min, y_max, y_min);
	GameTextForPlayer(playerid,
	   "Kill the ~y~Vagos!",
	   6000,5);
}

return 1;
}
//----------------------------------------------------------------------------
public ExitTheGameMode()
{
GameModeExit();
}
//----------------------------------------------------------------------------
public OnPlayerDeath(playerid, killerid, reason)
{
new deathstr[256];
new whodiedname[MAX_PLAYER_NAME+1];
new whokilledname[MAX_PLAYER_NAME+1];
new deathreasonstr[256];

GetPlayerName(playerid,whodiedname,MAX_PLAYER_NAME);
GetWeaponName(reason,deathreasonstr,255);

if(killerid == INVALID_PLAYER_ID) {
	if(strlen(deathreasonstr)) {
		format(deathstr,256,"%s died (%s)",whodiedname,deathreasonstr);
	} else {
		format(deathstr,256,"%s died",whodiedname);
	}
	SendClientMessageToAll(OBJECTIVE_COLOR, deathstr);
} else {
	GetPlayerName(killerid,whokilledname,MAX_PLAYER_NAME);
	if(gTeam[killerid] != gTeam[playerid]) {
		// Valid kill
		if(strlen(deathreasonstr)) {
			format(deathstr,256,"%s was killed by %s (%s)",whodiedname,whokilledname,deathreasonstr);
		} else {
			format(deathstr,256,"%s was killed by %s",whodiedname,whokilledname);
		}
		SendClientMessageToAll(OBJECTIVE_COLOR, deathstr);
		SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
	 }
	else {
		// Team kill
		format(deathstr,256,"%s killed team-mate %s (%s)",whokilledname,whodiedname,deathreasonstr);
		SendClientMessageToAll(OBJECTIVE_COLOR, deathstr);
	}
}
return 1;
}
//----------------------------------------------------------------------------

Bewerkt: door mosweg
Link to comment
Delen op andere websites

nu is het:

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(40) : warning 217: loose indentation

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(45) : warning 217: loose indentation

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(69) : warning 225: unreachable code

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(69) : error 029: invalid expression, assumed zero

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(69) : error 004: function "OnPlayerConnect" is not implemented

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(71) : error 017: undefined symbol "playerid"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(72) : error 017: undefined symbol "playerid"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(77) : warning 225: unreachable code

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(77) : error 029: invalid expression, assumed zero

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(77) : error 004: function "SetupPlayerForClassSelection" is not implemented

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(79) : error 017: undefined symbol "playerid"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(80) : error 017: undefined symbol "playerid"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(81) : warning 217: loose indentation

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(81) : error 017: undefined symbol "playerid"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(82) : warning 217: loose indentation

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(82) : error 017: undefined symbol "playerid"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(83) : error 017: undefined symbol "playerid"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(86) : error 029: invalid expression, assumed zero

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(86) : error 004: function "SetPlayerTeamFromClass" is not implemented

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(88) : error 017: undefined symbol "classid"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(89) : error 017: undefined symbol "playerid"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(90) : error 017: undefined symbol "classid"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(91) : error 017: undefined symbol "playerid"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(95) : error 029: invalid expression, assumed zero

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(95) : error 004: function "SetPlayerToTeamColor" is not implemented

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(97) : error 017: undefined symbol "playerid"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(98) : error 017: undefined symbol "playerid"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(99) : error 017: undefined symbol "playerid"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(100) : error 017: undefined symbol "playerid"

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(105) : error 029: invalid expression, assumed zero

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(105) : error 004: function "OnPlayerRequestClass" is not implemented

C:\Documents and Settings\Bjorn.123370910318\Bureaublad\Server\pawno\new.pwn(107) : error 004: function "SetupPlayerForClassSelection" is not implemented

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

26 Errors.

Link to comment
Delen op andere websites

Een reactie plaatsen

Je kan nu een reactie plaatsen en pas achteraf registreren. Als je al lid bent, log eerst in om met je eigen account een reactie te plaatsen.

Gast
Op dit onderwerp reageren...

×   Je hebt text geplaatst met opmaak.   Opmaak verwijderen

  Only 75 emoji are allowed.

×   Je link is automatisch ingevoegd.   In plaats daarvan weergeven als link

×   Je vorige bewerkingen zijn hersteld.   Alles verwijderen

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent actief   0 leden

    • Er zijn hier geen geregistreerde gebruikers aanwezig.

×
×
  • Create New...