symbol is never used - HELP -
Kudoz - 23.02.2012
I get this warning when compiling: warning 203: symbol is never used: "strtok"
I dont want to use pragma! It doesnt work. Already tried it.
Need help!
Re: symbol is never used - HELP -
IceCube! - 23.02.2012
Go into Pawno and press Ctrl + F then tyep 'stock strtok' Once you find this delete this if you cant find it check in your includes.
Re: symbol is never used - HELP -
Kudoz - 23.02.2012
Quote:
Originally Posted by IceCube!
Go into Pawno and press Ctrl + F then tyep 'stock strtok' Once you find this delete this if you cant find it check in your includes.
|
Couldn't find it. What and where do I have to check in includes?
Thanks for helping me btw
Re: symbol is never used - HELP -
Twisted_Insane - 23.02.2012
The folder of your server>>pawno>>includes>>Search for any file called "strtok"!
IF not, search in your gamemode only for: strtok
Re: symbol is never used - HELP -
Tanush123 - 23.02.2012
Show the line of the warning
Re: symbol is never used - HELP -
Kudoz - 23.02.2012
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128];
new idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/lvap", true) == 0)
{
I found that strtok.. but if I remove it, that tele wont work..
Btw, thats not the whole telescript
Re: symbol is never used - HELP -
Kudoz - 23.02.2012
Quote:
Originally Posted by Tanush123
Show the line of the warning
|
It isnt a line. My script goes to 855. The warning is at 856.. Thats why i dont know a shit about it.. ;/
Re: symbol is never used - HELP -
dice7 - 23.02.2012
Delete the whole strtok function and replace your OnPlayerCommandText with this
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/lvap", true) == 0)
{
Re: symbol is never used - HELP -
Kudoz - 23.02.2012
Thanks
But now its more 'strtok' here.
Код:
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
Thats the last one. And Im still learnin pwn, so iono how to change From strtok cmds yet so..
I appriciate your help! Thanks !
Re: symbol is never used - HELP -
dice7 - 23.02.2012
You will have something like this in your script
pawn Код:
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;
}
Just delete it