Help with strtok
#1

Код:
C:\Documents and Settings\Jack\Desktop\paintball\Counter Strike Source ™\gamemodes\cs.pwn(494) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Jack\Desktop\paintball\Counter Strike Source ™\gamemodes\cs.pwn(494) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Jack\Desktop\paintball\Counter Strike Source ™\gamemodes\cs.pwn(494) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Jack\Desktop\paintball\Counter Strike Source ™\gamemodes\cs.pwn(494) : fatal error 107: too many error messages on one line

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


4 Errors.
And on line 494 it's this..
Код:
strtok(const string[], &index)
Reply
#2

Post the whole callback above it.
Reply
#3

This?
Код:
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;
}
Reply
#4

Quote:
Originally Posted by xLowrider
This?
Код:
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;
}
Above it.
Reply
#5

Sorry for the retardation, I'm forgot what the Callbacks are Are they the Defines/Forwards/news?
Reply
#6

Quote:
Originally Posted by xLowrider
Sorry for the retardation, I'm forgot what the Callbacks are Are they the Defines/Forwards/news?
http://en.wikipedia.org/wiki/Callbac...puter_science)
Reply
#7

Forget it. I'll figre it out myself....
Reply
#8

Quote:
Originally Posted by xLowrider
Forget it. I'll figre it out myself....
Basically. When something is called, it's a callback. public OnPlayerConnect is a callback, called when a player connects. So whatever the public/stock is above it. Post it.
Reply
#9

Ohh, Nothing is above it, Is there meant to be?
Reply
#10

Quote:
Originally Posted by xLowrider
Ohh, Nothing is above it, Is there meant to be?
huh
Mind posting your script... ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)