Warning Does it matter in games?
#9

Quote:
Originally Posted by varthshenon
Посмотреть сообщение
What an immature people.

Btw I better give you the explanation of it.


Tabulation thing.


You make a new variable that's already exist.


You never use the variable you made.


It says all.
Well he just summed up just about everything. If you want to know how to fix the errors it's quite simple.
Код:
loose indentation
pawn Код:
//bad indentation
OnPlayerConnect(playerid)
{
    //dosomething
               //dosomething
         //dosomething
}
//good indentation
OnPlayerConnect(playerid)
{
    //dosomething
    //dosomething
    //dosomething
}
Код:
local variables shadows another variable
pawn Код:
new string[128]; // this variable is already there
OnPlayerConnect(playerid)
{
    new string[128]; // this shouldn't be here
    format(string, sizeof(string), "Welcome to the server %s", PlayerName(playerid));
    SendClientMessage(playerid, COLOR_GREEN, string);
}
Код:
symbol is never used
pawn Код:
new string[128]; // I don't see this being used anywhere
OnPlayerConnect(playerid)
{
    return 1;
}
Код:
symbol is assigned to a value that is never used
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid); // i don't see this being used
OnPlayerConnect(playerid)
{
    return 1;
}
Код:
number of arguments does not match definition
pawn Код:
OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid, x, y, z, a/*this isn't supposed to be there*/);
    return 1;
}
OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid, x, y, z); // now that's better
    return 1;
}
I hope this helped.
Reply


Messages In This Thread
Warning Does it matter in games? - by SmileyForCheat - 07.07.2011, 02:17
Re: Warning Does it matter in games? - by HayZatic - 07.07.2011, 02:21
Re: Warning Does it matter in games? - by SmileyForCheat - 07.07.2011, 02:24
Re: Warning Does it matter in games? - by Jack_Leslie - 07.07.2011, 02:28
Re: Warning Does it matter in games? - by PCheriyan007 - 07.07.2011, 02:35
Re: Warning Does it matter in games? - by Memoryz - 07.07.2011, 02:35
Re: Warning Does it matter in games? - by HayZatic - 07.07.2011, 02:37
Re: Warning Does it matter in games? - by =WoR=Varth - 07.07.2011, 02:40
Re: Warning Does it matter in games? - by PCheriyan007 - 07.07.2011, 02:52
Re: Warning Does it matter in games? - by Kyosaur - 07.07.2011, 07:26

Forum Jump:


Users browsing this thread: 1 Guest(s)