I have a many errors.. -
dundolina - 20.11.2011
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 ?
Re: I have a many errors.. -
SmiT - 20.11.2011
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.
Re: I have a many errors.. -
jiwan - 20.11.2011
Edit : explained by smit
i was late
Re: I have a many errors.. -
Kostas' - 20.11.2011
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;
}
Re: I have a many errors.. -
dundolina - 20.11.2011
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 ?
Re: I have a many errors.. -
Kostas' - 20.11.2011
Show us the code here, I cannot guess from which code missing a ";"and for the undefined symbol "string"
Re: I have a many errors.. -
dundolina - 20.11.2011
//================================================== ============================
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
Re: I have a many errors.. -
Kostas' - 20.11.2011
God!
Show me the lines 3765 to 3772
Re: I have a many errors.. -
dundolina - 20.11.2011
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];
Re: I have a many errors.. -
SmiT - 20.11.2011
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
}