symbol is never used - HELP
#1

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!
Reply
#2

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.
Reply
#3

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
Reply
#4

The folder of your server>>pawno>>includes>>Search for any file called "strtok"!

IF not, search in your gamemode only for: strtok
Reply
#5

Show the line of the warning
Reply
#6

Код:
 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
Reply
#7

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.. ;/
Reply
#8

Delete the whole strtok function and replace your OnPlayerCommandText with this

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/lvap", true) == 0)
    {
Reply
#9

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 !
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)