<Fix your topic title - The rules state they should be descriptive>
#1

Quote:

D:\Scripturi samp\HardRP\gamemodes\larp.pwn(26621) : warning 219: local variable "strtok" shadows a variable at a preceding level
D:\Scripturi samp\HardRP\gamemodes\larp.pwn(26622) : error 012: invalid function call, not a valid address
D:\Scripturi samp\HardRP\gamemodes\larp.pwn(26622) : warning 215: expression has no effect
D:\Scripturi samp\HardRP\gamemodes\larp.pwn(26622) : warning 215: expression has no effect
D:\Scripturi samp\HardRP\gamemodes\larp.pwn(26622) : error 001: expected token: ";", but found ")"
D:\Scripturi samp\HardRP\gamemodes\larp.pwn(26622) : error 029: invalid expression, assumed zero
D:\Scripturi samp\HardRP\gamemodes\larp.pwn(26622) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Line:

Quote:

new strtok;
cmd = strtok(cmdtext, idx);

Reply
#2

delete new strtok; and put this on end of your script:
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;
}

I recommend that you use something most recent, as Sscanf...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)