ERRORS !
#1



How to fix it? need quick help please...
Reply
#2

Quote:
Originally Posted by howtodo
Посмотреть сообщение


How to fix it? need quick help please...
Need to see your code buddy...
Reply
#3

PHP код:
/*    if(strcmp(cmd, "/takestretcher", true) == 0) //HOSPITAL (NEW)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsPlayerInRangeOfPoint(playerid ,3.0, 1216.8700, -1370.1622, 1017.8790))
            {
                   if(PlayerInfo[playerid][pMember] != 4 || PlayerInfo[playerid][pLeader] != 4)
                   {
                    AttachObjectToPlayer( hospybed, playerid, 0, 1.5, -0.5, 0, 0, 0 ); // add the co-ordinates on the player skin
                    return 1;
                }
            }
        }
    }
    if(strcmp(cmd, "/dropstretcher", true) == 0) //HOSPITAL (NEW)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsPlayerInRangeOfPoint(playerid ,25.0, 1216.8700, -1370.1622, 1017.8790))
            {
                   if(PlayerInfo[playerid][pMember] != 4 || PlayerInfo[playerid][pLeader] != 4)
                   {
                       DestroyObject(hospybed);
                        hospybed = CreateDynamicObject(2146, 1217.627441, -1370.959229, 1017.364563, 0.0000, 0.0000, 90.0000);
                    return 1;
                }
            }
            else
            {
                 SendClientMessage(playerid, COLOR_GREY, "   You are Not inside the hospital!");
                return 1;
            }
            else
            {
                 SendClientMessage(playerid, COLOR_GREY, "   You are Not High Enough Leader!");
                return 1;
            }
        }
    }*/ 
Reply
#4

Okay, let's start on fixing this script.

FIRST: Make sure you have actually defined hospybed as something (You haven't included any definition line in this code paste.)

SECOND:

pawn Код:
if(strcmp(cmd, "/takestretcher", true) == 0) //HOSPITAL (NEW)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsPlayerInRangeOfPoint(playerid ,3.0, 1216.8700, -1370.1622, 1017.8790))
            {
                   if(PlayerInfo[playerid][pMember] != 4 || PlayerInfo[playerid][pLeader] != 4)
                   {
                    AttachObjectToPlayer( hospybed, playerid, 0, 1.5, -0.5, 0, 0, 0 ); // add the co-ordinates on the player skin
                    return 1;
                }
            }
        }
    }
    if(strcmp(cmd, "/dropstretcher", true) == 0) //HOSPITAL (NEW)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsPlayerInRangeOfPoint(playerid ,25.0, 1216.8700, -1370.1622, 1017.8790))
            {
                if(PlayerInfo[playerid][pMember] != 4 || PlayerInfo[playerid][pLeader] != 4)
                {
                    DestroyObject(hospybed);
                    hospybed = CreateDynamicObject(2146, 1217.627441, -1370.959229, 1017.364563, 0.0000, 0.0000, 90.0000);
                    return 1;
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "   You are Not High Enough Leader!");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   You are Not inside the hospital!");
                return 1;
            }
        }
    }
You had two else's in the same if statement, so I've moved that around slightly for you... It's untested of course, so I don't know if I've fixed it completely, but tell me if I'm wrong..


Lastly, you haven't provided the lines for your WARNINGS, it'll be handy to have a look at those too.
Reply
#5

OK, thanks for the help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)