Warning 215 giving rep
#1

Код:
C:\Users\Beljulji\Documents\Samp Server\gamemodes\UltimateStunt.pwn(7508) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
and her is hole onplayerspawn :
Код:
public OnPlayerSpawn(playerid)
{
    TextDrawHideForPlayer(playerid, Textdraw0);
    TextDrawHideForPlayer(playerid, Textdraw1);
    TextDrawHideForPlayer(playerid, Textdraw2);
    TextDrawHideForPlayer(playerid, Textdraw3);
    TextDrawHideForPlayer(playerid, Textdraw4);
    TextDrawHideForPlayer(playerid, Textdraw5);
    TextDrawHideForPlayer(playerid, Textdraw6);
    TextDrawHideForPlayer(playerid, Textdraw7);
    TextDrawShowForPlayer(playerid, flip);
    TextDrawShowForPlayer(playerid, autorepair);
    PlayerPlaySound(playerid, 1184, 2127.2194,2368.6323,10.8203);
    EnableBoast[playerid] = 0;
    TextDrawShowForPlayer(playerid, UStuntingTextDraw);
    TextDrawShowForPlayer(playerid, Time), TextDrawShowForPlayer(playerid, Date);
    GivePlayerWeapon(playerid,24,500);
    GivePlayerWeapon(playerid,27,500);
    GivePlayerWeapon(playerid,34,500);
  	{
	return 1;
    }
    if(dm1[playerid] == 1) // If player is in dm1
    {
        return SetPlayerPos(playerid,203.5948, 1929.7161, 22.8286); // You force the player to put the command
    }
    if(dm1[playerid] == 2) // If player is in dm1
    {
        return SetPlayerPos(playerid,1537.8425,-1575.7318,67.2109); // You force the player to put the command
    }
    if(dm1[playerid] == 3) // If player is in dm1
    {
        return SetPlayerPos(playerid,-2155.9631,-194.5772,35.3203); // You force the player to put the command
    }
    if(dm1[playerid] == 4) // If player is in dm1
    {
        return SetPlayerPos(playerid,2377.4360351563, -4025.4250488281, 4.6225266456604); // You force the player to put the command
    }
    if(dm1[playerid] == 5) // If player is in dm1
    {
        return SetPlayerPos(playerid, 1290.5618,-2034.6489,58.2215); // You force the player to put the command
    }
    if(dm1[playerid] == 6) // If player is in dm1
    {
        return SetPlayerPos(playerid,2506.8252,-1667.8278,13.3767); // You force the player to put the command
    }
    if(dm1[playerid] == 7) // If player is in dm1
    {
        return SetPlayerPos(playerid,-1390.3849, 1494.4746, 1.6152); // You force the player to put the command
    }
    if(dm1[playerid] == 8) // If player is in dm1
    {
        return SetPlayerPos(playerid,-4799.9326, 1680.8673, 15.0000); // You force the player to put the command
    }

	return 1;
}
pls help
Reply
#2

pawn Код:
public OnPlayerSpawn(playerid)
{
    TextDrawHideForPlayer(playerid, Textdraw0);
    TextDrawHideForPlayer(playerid, Textdraw1);
    TextDrawHideForPlayer(playerid, Textdraw2);
    TextDrawHideForPlayer(playerid, Textdraw3);
    TextDrawHideForPlayer(playerid, Textdraw4);
    TextDrawHideForPlayer(playerid, Textdraw5);
    TextDrawHideForPlayer(playerid, Textdraw6);
    TextDrawHideForPlayer(playerid, Textdraw7);
    TextDrawShowForPlayer(playerid, flip);
    TextDrawShowForPlayer(playerid, autorepair);
    PlayerPlaySound(playerid, 1184, 2127.2194,2368.6323,10.8203);
    EnableBoast[playerid] = 0;
    TextDrawShowForPlayer(playerid, UStuntingTextDraw);
    TextDrawShowForPlayer(playerid, Time), TextDrawShowForPlayer(playerid, Date);
    GivePlayerWeapon(playerid,24,500);
    GivePlayerWeapon(playerid,27,500);
    GivePlayerWeapon(playerid,34,500);
    if(dm1[playerid] == 1) // If player is in dm1
    {
        return SetPlayerPos(playerid,203.5948, 1929.7161, 22.8286); // You force the player to put the command
    }
    if(dm1[playerid] == 2) // If player is in dm1
    {
        return SetPlayerPos(playerid,1537.8425,-1575.7318,67.2109); // You force the player to put the command
    }
    if(dm1[playerid] == 3) // If player is in dm1
    {
        return SetPlayerPos(playerid,-2155.9631,-194.5772,35.3203); // You force the player to put the command
    }
    if(dm1[playerid] == 4) // If player is in dm1
    {
        return SetPlayerPos(playerid,2377.4360351563, -4025.4250488281, 4.6225266456604); // You force the player to put the command
    }
    if(dm1[playerid] == 5) // If player is in dm1
    {
        return SetPlayerPos(playerid, 1290.5618,-2034.6489,58.2215); // You force the player to put the command
    }
    if(dm1[playerid] == 6) // If player is in dm1
    {
        return SetPlayerPos(playerid,2506.8252,-1667.8278,13.3767); // You force the player to put the command
    }
    if(dm1[playerid] == 7) // If player is in dm1
    {
        return SetPlayerPos(playerid,-1390.3849, 1494.4746, 1.6152); // You force the player to put the command
    }
    if(dm1[playerid] == 8) // If player is in dm1
    {
        return SetPlayerPos(playerid,-4799.9326, 1680.8673, 15.0000); // You force the player to put the command
    }
    return 1;
}
Reply
#3

EXPLAIN WHAT IS WRONG. Don't just give out code or they'll be back with the same thing.

@OP: Unreachable code is code that is never going to be executed (therefore, unreachable). You had an opening bracket (yes ******, I said it your way this time xD) in the middle of your code and returned 1 over there which is a bit silly. A return statement stops the execution of any following code in the function.
Reply
#4

Quote:
Originally Posted by mamorunl
Посмотреть сообщение
EXPLAIN WHAT IS WRONG. Don't just give out code or they'll be back with the same thing.

@OP: Unreachable code is code that is never going to be executed (therefore, unreachable). You had an opening bracket (yes ******, I said it your way this time xD) in the middle of your code and returned 1 over there which is a bit silly. A return statement stops the execution of any following code in the function.
Congratz [nerd], the thing is, they don't read that, they just copy the code and if it works, it works, if it don't works they may read the rest of your post. So it like wasting time to explain what they did wrong in most cases.
Reply
#5

Look at this rule..

Quote:

Be descriptive when making replies, explain the problem so that the person doesn't make the same mistake again. Just feeding them code is not helping them learn.

Reply
#6

Nice rule, I hope you are happy with it.
Reply
#7

Quote:
Originally Posted by Roel
Посмотреть сообщение
Congratz [nerd], the thing is, they don't read that, they just copy the code and if it works, it works, if it don't works they may read the rest of your post. So it like wasting time to explain what they did wrong in most cases.
Whilst you may think I am a 'nerd'. I at least take the time to explain it to them. You on the other hand [noob] do not take time whatsoever and just give out 'code' and now make stupid remarks.

If you really think that way as described in your post then why are you posting at all? you are not helping you are merely giving out code (which most of the time isn't even working)
Reply
#8

Quote:
Originally Posted by mamorunl
Посмотреть сообщение
Whilst you may think I am a 'nerd'. I at least take the time to explain it to them. You on the other hand [noob] do not take time whatsoever and just give out 'code' and now make stupid remarks.

If you really think that way as described in your post then why are you posting at all? you are not helping you are merely giving out code (which most of the time isn't even working)
Well it was working for him, and I don't see you helping people, the only thing you do is trying to abase people who are atleast trying to help other people instead of expressing thereselfs as big boy.
Reply
#9

Quote:
Originally Posted by Roel
Посмотреть сообщение
Well it was working for him, and I don't see you helping people, the only thing you do is trying to abase people who are atleast trying to help other people instead of expressing thereselfs as big boy.
Get your facts straight before you judge people. You aren't helping him, you are disobeying rules and have been whining non-stop. Now you have been put straight by two people and you are still digging yourself deeper and deeper by going against it (even when you know you are in the wrong).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)