Error Message.
#1

Here is my code.

Код:
if(strcmp(cmd, "/loadproducts", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	    	IsPlayerInRangeOfPoint(playerid, 7, -75.2536,-1598.1886,2.6172);
	    	{
   				SendClientMessage(playerid, COLOR_BLUE, "Deliver the Products to IdleWood Gas Station. (RED MARK)");
				return 1;
			}
[line 33328]			SendClientMessage(playerid, COLOR_GRAD2, "You are not at the Pickup place");
		}
		return 1;
	}
The error is.
Код:
(33328) : warning 225: unreachable code
Can anyone help??

Thanks!
Reply
#2

Код:
if(strcmp(cmd, "/loadproducts", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	    	if(IsPlayerInRangeOfPoint(playerid, 7, -75.2536,-1598.1886,2.6172));
	    	{
   				SendClientMessage(playerid, COLOR_BLUE, "Deliver the Products to IdleWood Gas Station. (RED MARK)");
				}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "You are not in trucker place.");
				return 1;
			}
TRY
Reply
#3

IsPlayerInRangeOfPoint must be

if(IsPlayerInRangeOfPoint

Try this code?
pawn Код:
if(strcmp(cmd, "/loadproducts", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsPlayerInRangeOfPoint(playerid, 7, -75.2536,-1598.1886,2.6172);
            {
                SendClientMessage(playerid, COLOR_BLUE, "Deliver the Products to IdleWood Gas Station. (RED MARK)");
                return 1;
            }
        else
        {
            SendClientMessage(playerid, COLOR_GRAD2, "You are not at the Pickup place");
        }
        return 1;
    }
Reply
#4

pawn Код:
if(strcmp(cmd, "/loadproducts", true) == 0)
    {  
           if(IsPlayerConnected(playerid))
        {
                if(IsPlayerInRangeOfPoint(playerid, 7, -75.2536,-1598.1886,2.6172);
            {
                SendClientMessage(playerid, -1, "Deliver the Products to IdleWood Gas Station. (RED MARK)");
                return 1;
            }
  else
        {
            SendClientMessage(playerid, -1, "You are not at the Pickup place");
        }
        return 1;
    }
EDIT: OMG 2 REPLYS so fast lol.
Reply
#5

I used that but i get these..
Quote:

C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(3214) : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(3229) : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(324 : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(326 : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(3304) : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(3454) : error 017: undefined symbol "GetPlayer2DZone"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(3511) : error 017: undefined symbol "GetPlayer2DZone"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(3554) : error 004: function "FixHour" is not implemented
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(3774) : error 017: undefined symbol "IsNumeric"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(4314) : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(5335) : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(534 : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(5566) : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(5581) : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(6530) : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(6776) : error 017: undefined symbol "IsNumeric"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(6789) : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(6809) : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(6829) : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(6849) : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(6869) : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(6889) : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(6911) : error 017: undefined symbol "IsNumeric"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(6924) : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(6944) : error 017: undefined symbol "ProxDetector"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(6964) : error 017: undefined symbol "ProxDetector"

Reply
#6

some brackets is missing

try this

pawn Код:
if(strcmp(cmd, "/loadproducts", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsPlayerInRangeOfPoint(playerid, 7, -75.2536,-1598.1886,2.6172);
            {
                SendClientMessage(playerid, -1, "Deliver the Products to IdleWood Gas Station. (RED MARK)");
                return 1;
            }
        }
        else
        {
            SendClientMessage(playerid, -1, "You are not at the Pickup place");
        }
        return 1;
    }
Reply
#7

Faster than Fast hehe but the downpoint is

Quote:

This forum requires that you wait 120 seconds between posts. Please try again in 50 seconds.

Include these in your script too

pawn Код:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);

public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
    if(IsPlayerConnected(playerid))
    {
        new Float:posx, Float:posy, Float:posz;
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        //radi = 2.0; //Trigger Radius
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
            {
                GetPlayerPos(i, posx, posy, posz);
                tempposx = (oldposx -posx);
                tempposy = (oldposy -posy);
                tempposz = (oldposz -posz);
                //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
                if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
                {
                    SendClientMessage(i, col1, string);
                }
                else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
                {
                    SendClientMessage(i, col2, string);
                }
                else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
                {
                    SendClientMessage(i, col3, string);
                }
                else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
                {
                    SendClientMessage(i, col4, string);
                }
                else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
                {
                    SendClientMessage(i, col5, string);
                }
            }
            else
            {
                SendClientMessage(i, col1, string);
            }
        }
    }//not connected
    return 1;
}

IsNumeric(const string[])
{
        for (new i = 0, j = strlen(string); i < j; i++)
        {
                if (string[i] > '9' || string[i] < '0') return 0;
        }
        return 1;
}
Should work a charm OR you are missing or misplaced a bracket?
Reply
#8

Quote:
Originally Posted by fie
Посмотреть сообщение
I used that but i get these..
missing a bracket i assume.
Reply
#9

Okay, better.
just problem on this line.
Quote:

if(IsPlayerInRangeOfPoint(playerid, 7, -75.2536,-1598.1886,2.6172);

Quote:

C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(33323) : error 001: expected token: ")", but found ";"
C:\Users\Joe\Desktop\R112 SCRIPT\gamemodes\sarp.pwn(33323) : error 036: empty statement
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

thanka
Reply
#10

Код:
if(IsPlayerInRangeOfPoint(playerid, 7, -75.2536,-1598.1886,2.6172));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)