Stupid Pawno error code 30. :P
#1

Код:
#include <a_samp>
#define FILTERSCRIPT
#define blue 0x0A16BF

// Teleports players to the center of San Andreas when they type /middle
public OnPlayerCommandText(playerid,cmdtext[])
{
    if(!strcmp(cmdtext,"/LSHospital",true)) // teleports to the hospital in Los Santos
    {
        SetPlayerPos(playerid,2029.961181,1413.184936,16.998857);
		SendClientMessage(playerid, blue, "You have teleported to Los Santos Hospital.");
		return 1;
    }
    return 0;
{
	if(!strcmp(cmdtext,"/LSAirport",true)) // teleports to the airport in LS
    {
        SetPlayerPos(playerid,1642.62,-2333.79,13.55);
		SendClientMessage(playerid, blue, "You have teleported to Los Santos Airport.");
		return 1;
    }
    return 0;
{
	if(!strcmp(cmdtext,"/LSPD",true)) // teleports to the police department in Los Santos
    {
		SetPlayerPos(playerid,1553.175537,1675.653198,16.195312);
		SendClientMessage(playerid, blue, "You have teleported to Los Santos Police Department.");
  return 1;
    }
    return 0;
{
Reply
#2

We got these warnings and errors in Pawno. Please help Dx


C:\Users\Breanna\Desktop\Snowy server\filterscripts\teleports.pwn(15) : warning 225: unreachable code
C:\Users\Breanna\Desktop\Snowy server\filterscripts\teleports.pwn(15) : warning 217: loose indentation
C:\Users\Breanna\Desktop\Snowy server\filterscripts\teleports.pwn(23) : warning 225: unreachable code
C:\Users\Breanna\Desktop\Snowy server\filterscripts\teleports.pwn(23) : warning 217: loose indentation
C:\Users\Breanna\Desktop\Snowy server\filterscripts\teleports.pwn(2 : warning 217: loose indentation
C:\Users\Breanna\Desktop\Snowy server\filterscripts\teleports.pwn(31) : warning 225: unreachable code
C:\Users\Breanna\Desktop\Snowy server\filterscripts\teleports.pwn(31) : warning 217: loose indentation
C:\Users\Breanna\Desktop\Snowy server\filterscripts\teleports.pwn(32) : error 030: compound statement not closed at the end of file (started at line 32)

1 Error.
Reply
#3

PHP код:
#include <a_samp>
#define blue 0x0A16BF 
PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/LSHospital"true)) // teleports to the hospital in Los Santos
    
{
        
SetPlayerPos(playerid2029.9611811413.18493616.998857);
        
SendClientMessage(playeridblue"You have teleported to Los Santos Hospital.");
        return 
1;
    }
    if(!
strcmp(cmdtext"/LSAirport"true)) // teleports to the airport in LS
    
{
        
SetPlayerPos(playerid1642.62, -2333.7913.55);
        
SendClientMessage(playeridblue"You have teleported to Los Santos Airport.");
        return 
1;
    }
    if(!
strcmp(cmdtext"/LSPD"true)) // teleports to the police department in Los Santos
    
{
        
SetPlayerPos(playerid1553.1755371675.65319816.195312);
        
SendClientMessage(playeridblue"You have teleported to Los Santos Police Department.");
        return 
1;
    }
    return 
0;

Look this: https://sampwiki.blast.hk/wiki/Using_strcmp()
Reply
#4

Thank you Speed++ !!! It worked xD
Reply
#5

You didn't closed the function with the { at the end of the work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)