Script help, 1 error 5 warnings.
#5

Код HTML:
public OnPlayerSpawn(playerid)
{
//---------------------[SPAWN/S]------------------------------//
SetPlayerPos(playerid, -1387.0272,-200.5146,14.1462);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
GivePlayerMoney(playerid, 5000);
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	GivePlayerMoney(playerid, -250);
	SendClientMessage(playerid, COLOR_YELLOW, "You have died, and due to your death you have paid 250$ hospital bills.");
	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("/help", cmdtext, true, 5) == 0)
	{
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "Hazard-Gaming/HZG - rules, and helpfull information.");
		SendClientMessage(playerid, COLOR_WHITE, "You're currently playing on HZG stunt server, V1.0 - Created by Kabron`.");
		SendClientMessage(playerid, COLOR_WHITE, "You can use /cmds and /teles for a list of available commands and teleports.");
		SendClientMessage(playerid, COLOR_WHITE, "For any questions you'll be able to use /faq, or /report and wait for an admin to respond.");
		SendClientMessage(playerid, COLOR_WHITE, "If you've any suggestions, or usefull information please post it at our forums - www.hz-gaming.com.");
		return 1;
	}
	
    if (strcmp("/cranedm", cmdtext, true, 5) == 0)
    {
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "You've chosen to teleport to Crane-DM! Have fun, and watch your ass.");
		ResetPlayerWeapons(playerid);
		SetPlayerPos(playerid, 2737.6313,-2502.9897,13.4869);
		GivePlayerWeapon(playerid, 23, 200);
		GivePlayerWeapon(playerid, 26, 100);
		GivePlayerWeapon(playerid, 31, 500);
		GivePlayerWeapon(playerid, 41, 50);
		return 1;
	 }
	 
	 if (strcmp("/teles", cmdtext, true, 5) == 0)
	 {
		ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "All the available teleports", "Deathmatches: /cranedm, \nStunt maps: /sfair, \nJumps:", "Thank-you!", "Close");
		return 1;
	 }
	 
	 if (strcmp("/sfair", cmdtext, true, 5) == 0)
	 {
       SetPlayerPos(playerid, -1387.0272,-200.5146,14.1462);
       SendClientMessage(playerid, COLOR_ORANGE, "You've decided to teleport to the San Fierro airport, enjoy your stunting!");
       return 1;
     }
     
     if (strcmp("/cmds", cmdtext, true, 5) == 0)
	 {
	   ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "All the commands there are.", "For teleports - use /teles. \nFor any help you can use /help, or /faq. \nTo request an administrators help, or report anything use /report. \nTo purchase weapons use - /shop. \n To reach the vehicle menu use - /v.", "Thank-you!", "Close");
     }
  return 0;
}

It works however there're two warning, lines 395 and 412. Those are the errors;

Line 395:
if (strcmp("/teles", cmdtext, true, 5) == 0)

And line 412:
return 0;

Here's the warning message:

Код HTML:
C:\Users\user\Desktop\Hazard Gaming\HZG V1.0\gamemodes\Hazard.pwn(395) : warning 217: loose indentation
C:\Users\user\Desktop\Hazard Gaming\HZG V1.0\gamemodes\Hazard.pwn(412) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Reply


Messages In This Thread
Script help, 1 error 5 warnings. - by CLT - 24.06.2013, 14:13
Re: Script help, 1 error 5 warnings. - by introzen - 24.06.2013, 14:14
Re: Script help, 1 error 5 warnings. - by Josh_Main - 24.06.2013, 14:28
Re: Script help, 1 error 5 warnings. - by introzen - 24.06.2013, 14:29
Re: Script help, 1 error 5 warnings. - by CLT - 24.06.2013, 14:31
Re: Script help, 1 error 5 warnings. - by Josh_Main - 24.06.2013, 14:40
Re: Script help, 1 error 5 warnings. - by CLT - 24.06.2013, 14:44
Re: Script help, 1 error 5 warnings. - by Josh_Main - 24.06.2013, 14:45
Re: Script help, 1 error 5 warnings. - by introzen - 24.06.2013, 14:47
Re: Script help, 1 error 5 warnings. - by CLT - 24.06.2013, 15:19

Forum Jump:


Users browsing this thread: 3 Guest(s)