SA-MP Forums Archive
Error "string" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Error "string" (/showthread.php?tid=90468)



Error "string" - Typhome - 08.08.2009

Код:
C:\Users\Martin\Desktop\SAMP PALMINO CREEK\pc.pwn(1230) : error 017: undefined symbol "string"
C:\Users\Martin\Desktop\SAMP PALMINO CREEK\pc.pwn(1230) : error 017: undefined symbol "string"
C:\Users\Martin\Desktop\SAMP PALMINO CREEK\pc.pwn(1230) : error 029: invalid expression, assumed zero
C:\Users\Martin\Desktop\SAMP PALMINO CREEK\pc.pwn(1230) : fatal error 107: too many error messages on one line

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


4 Errors.
http://pastebin.com/m4b17e1ae

Thanks


Re: Error "string" - paytas - 08.08.2009

lol @ OnPlayerUpdate. Crap code, looks like copy/paste from other shit scripts


Re: Error "string" - Dj_maryo1993 - 08.08.2009

Put new string[256] at line 1229


Re: Error "string" - paytas - 08.08.2009

Quote:
Originally Posted by Dj_maryo1993
Put new string[256] at line 1229
max players name lenght isn't 245 characters.


Re: Error "string" - Woet - 08.08.2009

Don't use OnPlayerUpdate like that, you are writing 20 files a second for each player ingame.
100 players = 2000 files being read and written at this same time, your gamemode will use an immense amount of resources and lag horribly.


Re: Error "string" - Typhome - 08.08.2009

Thanks,but i got more new 1 error.

Код:
C:\Users\Martin\Desktop\SAMP PALMINO CREEK\pc.pwn(1284) : error 017: undefined symbol "idx"
C:\Users\Martin\Desktop\SAMP PALMINO CREEK\pc.pwn(1718) : warning 203: symbol is never used: "GetPointDistanceToPointExMorph"
C:\Users\Martin\Desktop\SAMP PALMINO CREEK\pc.pwn(1718) : warning 203: symbol is never used: "TutTime"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
http://pastebin.com/m444bdc80

Help?


Re: Error "string" - Dj_maryo1993 - 08.08.2009

ad
Код:
new idx;
at line 1283 ,


Re: Error "string" - Typhome - 08.08.2009

Quote:
Originally Posted by Dj_maryo1993
ad
Код:
new idx;
at line 1283 ,
Already it's.

new idx;

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	new string[256];
	new cmd[256];
	new tmp[256];
	cmd = strtok(cmdtext, idx);
	new giveplayerid;
	new idx;
	new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
////////////////////////////////////////// FIXED /////////////////////////////////////////////////

Correct:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	new string[256];
	new cmd[256];
	new idx;
	new tmp[256];
	cmd = strtok(cmdtext, idx);
	new giveplayerid;
	new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
Thanks to Dj_maryo1993