5 Errors
#5

Getting new errors after trying it once again..

Код:
E:\games\server\EF Server\gamemodes\EFSERVER.pwn(11963) : error 001: expected token: "-string end-", but found "-identifier-"
E:\games\server\EF Server\gamemodes\EFSERVER.pwn(11964) : error 017: undefined symbol "fileToWrite"
E:\games\server\EF Server\gamemodes\EFSERVER.pwn(11965) : error 017: undefined symbol "fileToWrite"
E:\games\server\EF Server\gamemodes\EFSERVER.pwn(14674) : error 021: symbol already defined: "isNumeric"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
11951-11965 =
pawn Код:
CMD:suggest(playerid, params[])
{
    if ( isnull ( params ) ) return SendClientMessage( playerid, -1, #Syntax /suggest <suggestion> );

    new
        _msg[ 128 ],
        player_name[ MAX_PLAYER_NAME ];

    GetPlayerName( playerid, player_name, MAX_PLAYER_NAME );

    format( _msg, sizeof ( _msg ), "%s suggested: %s\r\n", player_name, params );

    new File: fileToWrite = fopen("suggestions.txt", io_append);
    fwrite(fileToWrite, _msg);
    fclose(fileToWrite);
14658-14687 =
pawn Код:
stock GetClosestLabel(playerid)
{
    new Float:distance = 10,Float:temp,Float:x,Float:y,Float:z,current = -1;
    GetPlayerPos(playerid,x,y,z);
    for(new i = 0;i<MAX_LABELS;i++)
    {
        temp = GetDistanceBetweenPoints(x,y,LInfo[i][POSX],LInfo[i][POSY]);
        if(temp < distance)
        {
            distance = temp;
            current = i;
        }
    }
    return current;
}
stock isNumeric(const string[])
{
    new length=strlen(string);
    if (length==0) return false;
    for (new i = 0; i < length; i++)
    {
      if (
            (string[i] > '9' || string[i] < '0' && string[i]!='-' && string[i]!='+') // Not a number,'+' or '-'
             || (string[i]=='-' && i!=0)                                             // A '-' but not at first.
             || (string[i]=='+' && i!=0)                                             // A '+' but not at first.
         ) return false;
    }
    if (length==1 && (string[0]=='-' || string[0]=='+')) return false;
    return true;
}
Reply


Messages In This Thread
5 Errors - by Sliceofdeath - 18.09.2013, 08:28
Re: 5 Errors - by Konstantinos - 18.09.2013, 08:31
Re: 5 Errors - by Sliceofdeath - 18.09.2013, 08:37
Re: 5 Errors - by Misiur - 18.09.2013, 08:45
Re: 5 Errors - by Sliceofdeath - 18.09.2013, 08:50
Re: 5 Errors - by Wizza - 18.09.2013, 08:53
Re: 5 Errors - by Sliceofdeath - 18.09.2013, 08:55
Re: 5 Errors - by Konstantinos - 18.09.2013, 08:57
Re: 5 Errors - by Sliceofdeath - 18.09.2013, 09:05

Forum Jump:


Users browsing this thread: 1 Guest(s)