Jump to content
  • 0

slot3 masini


carol_98

Question

Deci am luat un sistem de masini cu 3 sloturi si imi da 2 erori :

error 017: undefined symbol "strotok" 

                                                                si

error 033: array must be indexed (variable "x_nr")

La liniiilea astea:

new x_nr[256];

        x_nr = strotok(cmdtext, idx);

        if(!strlen(x_nr))

        {

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Pune undeva in script asta:

strtok(const stringstrtok[], &index)
{
	new length = strlen(stringstrtok);
	while ((index < length) && (stringstrtok[index] <= ' ')) { index++; }

	new offset = index, result[20];
	while ((index < length) && (stringstrtok[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = stringstrtok[index];
		index++;
	}
	result[index - offset] = EOS;
	return result;
}

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.