strmid(PlayerInfo
#1

It gives me errors.
Код:
strmid(PlayerInfo[playerid][Password], valtmp, 0, strlen(valtmp)-1, 255);
C:\DOCUME~1\17FE8~1.MRK\SKRIVB~1\serv\pawno\CnR.pw n(2189) : error 017: undefined symbol "PlayerInfo"
C:\DOCUME~1\17FE8~1.MRK\SKRIVB~1\serv\pawno\CnR.pw n(2189) : warning 215: expression has no effect
C:\DOCUME~1\17FE8~1.MRK\SKRIVB~1\serv\pawno\CnR.pw n(2189) : error 001: expected token: ";", but found "]"
C:\DOCUME~1\17FE8~1.MRK\SKRIVB~1\serv\pawno\CnR.pw n(2189) : error 029: invalid expression, assumed zero
C:\DOCUME~1\17FE8~1.MRK\SKRIVB~1\serv\pawno\CnR.pw n(2189) : fatal error 107: too many error messages on one line

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


4 Errors.
Reply
#2

Did you define PlayerInfo?
Reply
#3

I defined it now but i get:
Код:
C:\Documents and Settings\1.Mвrkь$\Skrivbord\serv\pawno\TEST.pwn(2213) : error 033: array must be indexed (variable "Cash")
C:\Documents and Settings\1.Mвrkь$\Skrivbord\serv\pawno\TEST.pwn(2244) : error 033: array must be indexed (variable "Cash")
C:\Documents and Settings\1.Mвrkь$\Skrivbord\serv\pawno\TEST.pwn(2278) : error 033: array must be indexed (variable "Cash")
C:\Documents and Settings\1.Mвrkь$\Skrivbord\serv\pawno\TEST.pwn(2423) : error 021: symbol already defined: "strtok"
C:\Documents and Settings\1.Mвrkь$\Skrivbord\serv\pawno\TEST.pwn(5176) : warning 219: local variable "mod" shadows a variable at a preceding level
C:\Documents and Settings\1.Mвrkь$\Skrivbord\serv\pawno\TEST.pwn(5267) : warning 203: symbol is never used: "strtok"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Line 2213:GivePlayerMoney(playerid,PlayerInfo[playerid][Cash]);
Line 2244: format(var, 128, "Money=%d\n", PlayerInfo[playerid][Cash]);fwrite(hFile, var);
Line 2423: PlayerInfo[playerid][Cash] = GetPlayerMoney(playerid);
Line 2423 - 2440:
Код:
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;
}
Line 5176: new mod=GetModType(componentid);
Line 5267: End of file
Reply
#4

nvm fixed it, i still got:
Quote:

C:\Documents and Settings\1.Mвrkь$\Skrivbord\serv\pawno\TEST.pwn(24 23) : error 021: symbol already defined: "strtok"
C:\Documents and Settings\1.Mвrkь$\Skrivbord\serv\pawno\TEST.pwn(51 76) : warning 219: local variable "mod" shadows a variable at a preceding level
C:\Documents and Settings\1.Mвrkь$\Skrivbord\serv\pawno\TEST.pwn(52 67) : warning 203: symbol is never used: "strtok"

Reply
#5

1. You defined strtok twice
2. You defined 'mod' twice. Just change the variable name or delete it.
Reply
#6

strtok isnt defined any more, but i still get the error symbol strtok is never used.
nvm fixed it with #pragma unused strtok
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)