help me with errors.
#1

Hi, I got errors in game mode.


Any ideas how to fix it ?


pawn Код:
''cmd'' = (cmdtext, idx);

C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(1598) : error 027: invalid character constant
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(1598) : warning 215: expression has no effect
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(1598) : error 001: expected token: ";", but found "-identifier-"
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(1598) : error 027: invalid character constant
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(1598) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply
#2

I would suggest you adding a ";" to the end of the line..
or if you want real help then you should consider providing us with the code...
Reply
#3

Show us the code
Reply
#4

Quote:
Originally Posted by Kostas'
Посмотреть сообщение
Show us the code
pawn Код:
//------------------------------------------------------------------------------------------------------

public OnPlayerCommandText(playerid, cmdtext[])
{
    new string[256];
    new playermoney;
    new sendername[MAX_PLAYER_NAME];
        new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));
    new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
 new cmd [256];
    new giveplayerid, moneys, idx, weaponid;



 ''cmd'' = (cmdtext, idx);


    if(strcmp(cmd, "/help", true) == 0)
    {
    {
that?....

I think somehow... edit that cmd line..
Reply
#5

Which is line 1598?
Reply
#6

Quote:
Originally Posted by Kostas'
Посмотреть сообщение
Which is line 1598?
''cmd'' = (cmdtext, idx);
Reply
#7

Perhaps instead of:
pawn Код:
''cmd'' = (cmdtext, idx);
-
pawn Код:
cmd = (cmdtext, idx);
Reply
#8

Quote:
Originally Posted by SmiT
Посмотреть сообщение
Perhaps instead of:
pawn Код:
''cmd'' = (cmdtext, idx);
-
pawn Код:
cmd = (cmdtext, idx);
pawn Код:
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(1598) : error 033: array must be indexed (variable "cmd")
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(1773) : error 033: array must be indexed (variable "strBoostMultiplier")
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(2453) : warning 215: expression has no effect
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(2454) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(2459) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(2460) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(2460) : warning 215: expression has no effect
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(2461) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(2466) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(2467) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(2467) : warning 215: expression has no effect
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(2468) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(2473) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(2482) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(2482) : warning 215: expression has no effect
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(2482) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(2482) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(2482) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


8 Errors.
:S thats my friends gm and I can't compile it for that damn error now got 8 :3
Reply
#9

This should be:
pawn Код:
cmd = strtok(cmdtext, idx);

pawn Код:
strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }
 
    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
Reply
#10

pawn Код:
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(1592) : error 001: expected token: "-identifier-", but found "new"
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(1593) : error 017: undefined symbol "pName"
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(1593) : error 017: undefined symbol "pName"
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(1593) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ad05n\My Documents\mygm.pwn(1593) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
:S

still shit
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)