Help please!
#1

i hav some problem in my scripting can any one correct it?

Here is My gamemod

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

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" DeathMatch by AzTeCaS");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" DeathMatch by AzTeCaS");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("DM");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
       GivePlayerMonney(playerid, -5000);
{
	return 1;
}

public OnVehicleSpawn(vehicleid)

   GivePlayerMonney(playerid, 500);
   GivePlayerWeapon(playerid, 26, 28); // (playerid, WeaponID, Ammo)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)

		
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
		if (strcmp("/healme", cmdtext, true, 10) == 0)
	{
		SetPlayerHealth(playerid,100)// Set player hp to 100...
		
		return 1;

               f (strcmp("/killme", cmdtext, true, 10) == 0)
	{
		SetPlayerHealth(playerid,0)// Set player hp to 0...kill the player
		
		return 1;
	}
	return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
	return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
	return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
	return 1;
}

public OnPlayerUpdate(playerid)
{
	return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
	return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
	return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
	return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;
}
Reply
#2

C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(76) : error 017: undefined symbol "GivePlayerMonney"
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(77) : error 021: symbol already defined: "GivePlayerWeapon"
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(79) : error 010: invalid function or declaration
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(84) : error 017: undefined symbol "GivePlayerMonney"
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(85) : error 055: start of function body without function header
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(86) : error 010: invalid function or declaration
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(100) : error 001: expected token: ";", but found "return"
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(102) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(102) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(106) : error 001: expected token: ";", but found "}"
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(107) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(110) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(110) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(110) : error 004: function "OnPlayerEnterVehicle" is not implemented
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(115) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(115) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(115) : error 004: function "OnPlayerExitVehicle" is not implemented
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(120) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(120) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(120) : error 004: function "OnPlayerStateChange" is not implemented
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(125) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(125) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(125) : error 004: function "OnPlayerEnterCheckpoint" is not implemented
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(130) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(130) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(130) : error 004: function "OnPlayerLeaveCheckpoint" is not implemented
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(135) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(135) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(135) : error 004: function "OnPlayerEnterRaceCheckpoint" is not implemented
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(140) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(140) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(140) : error 004: function "OnPlayerLeaveRaceCheckpoint" is not implemented
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(145) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(145) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(145) : error 004: function "OnRconCommand" is not implemented
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(150) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(150) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(150) : error 004: function "OnPlayerRequestSpawn" is not implemented

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


26 Errors.

Can one Correct it
Reply
#3

You've got alot of problems on there,

you have thing like, Money spelt monney

try remove some unused callbacks also.
Reply
#4

please Correct it please
Reply
#5

Use this:

Code:
public OnVehicleSpawn(vehicleid)
{
	GivePlayerMoney(playerid, 500);
	GivePlayerWeapon(playerid, 26, 28);
	return 1;
}
Code:
public OnVehicleDeath(vehicleid, killerid)
{
	GivePlayerMoney(killerid, -5000)
	return 1;
}
Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/healme", cmdtext, true, 10) == 0)
	{
		SetPlayerHealth(playerid, 100);
		return 1;
	}
	if (strcmp("/killme", cmdtext, true, 10) == 0)
	{
		SetPlayerHealth(playerid, 0);
		return 1;
	}
	return 0;
}
Reply
#6

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

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" DeathMatch by AzTeCaS");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" DeathMatch by AzTeCaS");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("DM");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    GivePlayerMonney(playerid, -5000);
    return 1;
}

public OnVehicleSpawn(vehicleid)
{  
    GivePlayerMonney(playerid, 500);
    GivePlayerWeapon(playerid, 26, 28); // (playerid, WeaponID, Ammo)
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)

       
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/healme", cmdtext, true, 10) == 0)
    {
        SetPlayerHealth(playerid,100)// Set player hp to 100...
        return 1;
    }

        if (strcmp("/killme", cmdtext, true, 10) == 0)
    {
        SetPlayerHealth(playerid,0)// Set player hp to 0...kill the player
       
        return 1;
    }
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
Reply
#7

Obviously you have no idea what you are doing... You should read the Wiki.
Reply
#8

Quote:
Originally Posted by Snipa
View Post
Use this:

Code:
public OnVehicleSpawn(vehicleid)
{
	GivePlayerMoney(playerid, 500);
	GivePlayerWeapon(playerid, 26, 28);
	return 1;
}
Code:
public OnVehicleDeath(vehicleid, killerid)
{
	GivePlayerMoney(killerid, -5000)
	return 1;
}
Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/healme", cmdtext, true, 10) == 0)
	{
		SetPlayerHealth(playerid, 100);
		return 1;
	}
	if (strcmp("/killme", cmdtext, true, 10) == 0)
	{
		SetPlayerHealth(playerid, 0);
		return 1;
	}
	return 0;
}
dude now i hav 11 ERROR.thnx

this is my 11 ERROR

Code:
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM.pwn(70) : error 017: undefined symbol "GivePlayerMonney"
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM.pwn(71) : error 055: start of function body without function header
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM.pwn(72) : error 010: invalid function or declaration
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM.pwn(77) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM.pwn(78) : error 021: symbol already defined: "GivePlayerWeapon"
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM.pwn(79) : error 010: invalid function or declaration
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM.pwn(81) : error 055: start of function body without function header
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM.pwn(82) : error 010: invalid function or declaration
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM.pwn(88) : error 001: expected token: ";", but found "return"
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM.pwn(90) : error 055: start of function body without function header
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM.pwn(91) : error 010: invalid function or declaration
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM.pwn(105) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM.pwn(108) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


11 Errors.
Here u can Correct it;http://pastebin.com/SNpeAmuL
Reply
#9

Note .. Dont forget these after a line ;

now For OnVehicleSpawn

wont work make a function
forward OnVehicleSpawnS(vehicleid, playerid);

public OnVehicleSpawnS(vehicleid, playerid);
{
GivePlayerMoney(playerid, 500);
GivePlayerWeapon(playerid, 26, 2; // (playerid, WeaponID, Ammo)
return 1;
}

and put this in OnVehicleSpawn(vehicleid)

OnVehicleSpawnS();

havent tried it but good luck

everything else fixed



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

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" DeathMatch by AzTeCaS");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" DeathMatch by AzTeCaS");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("DM");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    GivePlayerMoney(playerid, -5000);
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)


{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/healme", cmdtext, true, 10) == 0)
    {
        SetPlayerHealth(playerid,100);// Set player hp to 100...
        return 1;
    }
    if (strcmp("/killme", cmdtext, true, 10) == 0)
    {
        SetPlayerHealth(playerid,0);// Set player hp to 0...kill the player

        return 1;
    }
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
Reply
#10

C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(105) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(105) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(107) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(246) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\GMDM. pwn(246) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Another ERROR when i get that Commands

Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/heal", cmdtext, true, 10) == 0)
    {
        SetPlayerHealth(playerid,200);// Set player hp to ...100
        return 1;
    }
    if (strcmp("/kill", cmdtext, true, 10) == 0)
    {
        SetPlayerHealth(playerid,0);// Set player hp to 0...kill the player
    }
        return 1;
        
    if (strcmp("/armor", cmdtext, true, 10) == 0)                         Another ERROR when i got that
    {
        GetPlayerArmour(playerid,200) //Set Player Armor to 100
    }
        return 1;
Reply
#11

Oh my good heavens... you need this ;

SetPlayerArmour(playerid, 200);

Im not gonna fix anymore problems dude im sorry.. goodluck man
Reply
#12

dude last one i hav just some warning

Код:
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(103) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(105) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(105) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(109) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(111) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(111) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(115) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(117) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(117) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(121) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(123) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(123) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(127) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(129) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(129) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(133) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(135) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(135) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(139) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(141) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(141) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(145) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(147) : warning 225: unreachable code
C:\Documents and Settings\Administrateur\Bureau\BWS\gamemodes\BWS testing.pwn(147) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


24 Warnings.
Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" DeathMatch by AzTeCaS");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" DeathMatch by AzTeCaS");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("DM");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    GivePlayerMoney(playerid, -5000);
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)


{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/heal", cmdtext, true, 10) == 0)
    {
        SetPlayerHealth(playerid,100);// Set player hp to 100...
        return 1;
    }
    if (strcmp("/kill", cmdtext, true, 10) == 0)
    {
        SetPlayerHealth(playerid,0);// Set player hp to 0...kill the player
    }
        return 1;
        
    if (strcmp("/sawnoff", cmdtext, true, 10) == 0)
    {
        GivePlayerWeapon(playerid,26,8000);
    }
        return 1;
        
    if (strcmp("/uzi", cmdtext, true, 10) == 0)
    {
        GivePlayerWeapon(playerid,28,8000);
    }
        return 1;
        
    if (strcmp("/deagle", cmdtext, true, 10) == 0)
    {
        GivePlayerWeapon(playerid,24,8000);
    }
        return 1;
        
     if (strcmp("/shotgun", cmdtext, true, 10) == 0)
    {
        GivePlayerWeapon(playerid,25,8000);
    }
        return 1;
        
     if (strcmp("/sniper", cmdtext, true, 10) == 0)
    {
        GivePlayerWeapon(playerid,34,8000);
    }
        return 1;
        
    if (strcmp("/spas", cmdtext, true, 10) == 0)
    {
        GivePlayerWeapon(playerid,27,8000);
    }
        return 1;
        
    if (strcmp("/spas", cmdtext, true, 10) == 0)
    {
       SetPlayerArmour(playerid, 200);
    }
       return 1;

    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
Correct it please
Reply
#13

On each error line you get after the return 1; Include the closing bracket } Under neith return 1;


Wait sorry remove return 1; on each line of error
Reply
#14

now i hav warning what i need to remove?
Reply
#15

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" DeathMatch by AzTeCaS");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" DeathMatch by AzTeCaS");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("DM");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    GivePlayerMoney(playerid, -5000);
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)


{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/heal", cmdtext, true, 10) == 0)
    {
        SetPlayerHealth(playerid,100);// Set player hp to 100...
        return 1;
    }
    if (strcmp("/kill", cmdtext, true, 10) == 0)
    {
        SetPlayerHealth(playerid,0);// Set player hp to 0...kill the player
        return 1;
    }
    if (strcmp("/sawnoff", cmdtext, true, 10) == 0)
    {
        GivePlayerWeapon(playerid,26,8000);
        return 1;
    }
    if (strcmp("/uzi", cmdtext, true, 10) == 0)
    {
        GivePlayerWeapon(playerid,28,8000);
        return 1;
    }
    if (strcmp("/deagle", cmdtext, true, 10) == 0)
    {
        GivePlayerWeapon(playerid,24,8000);
        return 1;
    }
    if (strcmp("/shotgun", cmdtext, true, 10) == 0)
    {
        GivePlayerWeapon(playerid,25,8000);
        return 1;
    }
    if (strcmp("/sniper", cmdtext, true, 10) == 0)
    {
        GivePlayerWeapon(playerid,34,8000);
        return 1;
    }
    if (strcmp("/spas", cmdtext, true, 10) == 0)
    {
        GivePlayerWeapon(playerid,27,8000);
        return 1;
    }
    if (strcmp("/spas", cmdtext, true, 10) == 0)
    {
       SetPlayerArmour(playerid, 200);
       return 1;
    }
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
Now just dont copy and paste man Review your code man What ever you add look at the one above it make it the same way like if you do

if (strcmp("/EXAMPLE", cmdtext, true, 10) == 0)
{
//YOUR FUNCTION here
return 1;
}

warning 217: loose indentation // Means Something ain't closed right or not lined up correctly with other lines
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)