Help with tmp = strtok(cmdtext,idx);
#1

hello,i wanted to compile TGRP (http://forum.sa-mp.com/index.php?topic=130746.0) but ehh,i got some errors

all lines are tmp = strtok(cmdtext,idx);

helps pls

heres the errors
Quote:

C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(3964) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(4150) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(4279) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(433 : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(4382) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(4385) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(438 : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(4559) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(4562) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(4615) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(4629) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(4643) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(4657) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(4671) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(4685) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(4699) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(4710) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(4747) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(4841) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(4886) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(5063) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(5067) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(5072) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(5076) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(5092) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(5097) : error 047: array sizes do not match, or destination array is too small

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


26 Errors.

Reply
#2

BUMP!
Reply
#3

You missed a bracket '{' somewhere
Reply
#4

can i check it somehow?
Reply
#5

yeah thanks,i did like that there were error that strtok is defined twice,anyways i added all the lines above //,if i take them away errors come back?
Reply
#6

strtok one?


Quote:

C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\TPGSERVER.pw n(11600) : error 021: symbol already defined: "strtok"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

11600 line is {


the full is
Quote:

stock strtok(const string[], &index,seperator=' ')
{
new length = strlen(string);
new offset = index;
new result[128];
while ((index < length) && (string[index] != seperator) && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}

result[index - offset] = EOS;
if ((index < length) && (string[index] == seperator))
{
index++;
}
return result;
}

Reply
#7

and the lines what i //ed i delete the //?
Reply
#8

then the errors come back!((
Reply
#9

cmd = strtok(cmdtext, idx); that one?

EDIT:i just put them //, i have prob with login :S i can register first time and then i cant login :S
it says already exists login or smth,heres the thing what he says everytime

Quote:

if(udb_Exists(PlayerName(playerid))
{
scm(playerid,c_r,"[ ! ] Account already exists, please use '/login password'.");
return 1;
}

i got prob with it ,it gives me error pls help:

Quote:

C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\89+R.pwn(400 9) : error 001: expected token: ")", but found "{"
C:\Documents and Settings\Ingrid\Desktop\MRP\gamemodes\89+R.pwn(146 19) : warning 203: symbol is never used: "strtok"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Reply
#10

new cmd[256];

On top of OnPlayerCommandText ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)