I have a many errors..
#1

C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3657) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3657) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3656) : warning 203: symbol is never used: "idx"
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3676) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3676) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3675) : warning 203: symbol is never used: "idx"
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3695) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3695) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3694) : warning 203: symbol is never used: "idx"
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3714) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3714) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3713) : warning 203: symbol is never used: "idx"
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3733) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3733) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3732) : warning 203: symbol is never used: "idx"
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3773) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3773) : error 033: array must be indexed (variable "cmd")
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(4005) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(4005) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(4017) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(4017) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(4334) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(4334) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(4381) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(4381) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(4579) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(4579) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(4679) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(4679) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(468 : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\ьаьа\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(468 : error 033: array must be indexed (variable "tmp")

--------------------------------------------------------------------------------------------------------------

How to fix it ?
Reply
#2

Undefined symbol 'strtok' - https://sampwiki.blast.hk/wiki/Strtok
Symbol is never used 'idx' - self-explanatory, you declared the variable 'idx' but you never used it.
Array must be indexed - an array as a whole cannot be used in a expression, you must indicate an element of the array between square brackets.
Reply
#3

Edit : explained by smit
i was late
Reply
#4

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[128], idx, tmp[32];
    tmp = strtok(cmdtext, idx);
    if ( strcmp( cmd, "/commands", true ) == 0 )
    // Rest Of Your Commands
pawn Код:
// At The End
stock strtok(const str[], &index)
{
    new length = strlen(str);
    while ((index < length) && (str[index] <= ' ')) {
        index++;
    }

    new offset = index;
    new result[20];
    while ((index < length) && (str[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) {
        result[index - offset] = str[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
Reply
#5

C:\Users\ники\Desktop\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3770) : error 003: declaration of a local variable must appear in a compound block
C:\Users\ники\Desktop\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3770) : error 017: undefined symbol "string"
C:\Users\ники\Desktop\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3770) : warning 215: expression has no effect
C:\Users\ники\Desktop\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3770) : error 001: expected token: ";", but found "]"
C:\Users\ники\Desktop\LV mod + gangs original R5 junk 2011\LV mod + gangs original\samp 0.3c server\gamemodes\gangwars.pwn(3770) : fatal error 107: too many error messages on one line

-----------------------------------------------------------------------------------------------------------

How to fix this ?
Reply
#6

Show us the code here, I cannot guess from which code missing a ";"and for the undefined symbol "string"
pawn Код:
new string[128];
Reply
#7

//================================================== ============================
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128], idx, tmp[32];
tmp = strtok(cmdtext, idx);
if ( strcmp( cmd, "/commands", true ) == 0 )
new string[128];
new cmd[256];
new tmp[256];
new playermoney;
new giveplayer[MAX_PLAYER_NAME];
new giveplayerid, specplayerid, moneys, idx;
cmd = strtok(cmdtext, idx);
printf("[cmd][%s]: %s",PlayerName(playerid),cmdtext);
//================================================== ============================

This
Reply
#8

God!
Show me the lines 3765 to 3772
Reply
#9

public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128], idx, tmp[32];
tmp = strtok(cmdtext, idx);
if ( strcmp( cmd, "/commands", true ) == 0 )
new string[128];
new cmd[256];
new tmp[256];
Reply
#10

What's up with
pawn Код:
if ( strcmp( cmd, "/commands", true ) == 0 )
this line there? Perhaps -

pawn Код:
if ( strcmp( cmd, "/commands", true ) == 0 )
{
    new string[128];
    new cmd[256];
    new tmp[256];
    // rest of code
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)