SA-MP Forums Archive
radio errror - 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: radio errror (/showthread.php?tid=125922)



radio errror - bartje01 - 06.02.2010

Hey guys. I am making a radio script. But it gives me errors. The command is: /r
Here is my script

http://pastebin.com/m76e791bb

Errors:
Код:
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(1040) : error 017: undefined symbol "strtok"
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(1040) : error 033: array must be indexed (variable "cmd")
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(1453) : warning 217: loose indentation
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(1458) : error 017: undefined symbol "strtok"
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(1458) : error 033: array must be indexed (variable "tmp")
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(1474) : warning 217: loose indentation
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(1479) : error 017: undefined symbol "strtok"
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(1479) : error 033: array must be indexed (variable "tmp")
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(1039) : warning 203: symbol is never used: "idx"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
I hope smeone is able to help me.

regards


Re: radio errror - scott1 - 06.02.2010

I add this to your script

Код:
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;
}
And i think, not sure, you ave to add thiis

Код:
new tmp[25];



Re: radio errror - bartje01 - 06.02.2010

Where do I have to put these things :P
Can someone add this to my gamemode please ? :P So I am sure it will be okay


Re: radio errror - scott1 - 06.02.2010

Its like a public, so put i after one


Re: radio errror - bartje01 - 06.02.2010

Quote:
Originally Posted by scott1
Its like a public, so put i after one
Damn, I just don't get it working