Pawno problem
#1

this is not a spcific usuall script problem. Sometimes when i script stuff compile it with no errors, then a day afterwards i compile it(without changeing anything) and i get like 26 errors. usually the errors contain strok stuff if it does not use zcmd include.


Anyone can help with this?
Reply
#2

If you don't mind show your errors.
Reply
#3

It's nothing to do with the errors it's just pawno acting weird. It just genarates errors. It usually happened after a computer restart(I will add the errors though in a few minutes).

Код:
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3269) : error 017: undefined symbol "strtok"
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3269) : error 033: array must be indexed (variable "cmd")
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3312) : error 017: undefined symbol "strtok"
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3312) : error 033: array must be indexed (variable "tmp")
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3344) : error 017: undefined symbol "strtok"
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3344) : error 033: array must be indexed (variable "tmp")
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3374) : error 017: undefined symbol "strtok"
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3374) : error 033: array must be indexed (variable "tmp")
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3409) : error 017: undefined symbol "strtok"
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3409) : error 033: array must be indexed (variable "tmp")
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3461) : error 017: undefined symbol "strtok"
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3461) : error 033: array must be indexed (variable "tmp")
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3570) : error 017: undefined symbol "strtok"
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3570) : error 033: array must be indexed (variable "tmp")
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3670) : error 017: undefined symbol "strtok"
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3670) : error 033: array must be indexed (variable "tmp")
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3785) : error 017: undefined symbol "strtok"
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3785) : error 033: array must be indexed (variable "tmp")
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3793) : error 017: undefined symbol "strtok"
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3793) : error 033: array must be indexed (variable "tmp")
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3840) : error 017: undefined symbol "strtok"
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(3840) : error 033: array must be indexed (variable "tmp")
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(4300) : error 017: undefined symbol "strtok"
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(4300) : error 033: array must be indexed (variable "tmp")
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(4370) : error 017: undefined symbol "strtok"
C:\Users\msi\Desktop\samp03z_svr_R1_win32\samp03z_svr_R1_win32\gamemodes\EmrRunix.pwn(4370) : error 033: array must be indexed (variable "tmp")

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


26 Errors.
Reply
#4

bump i really need help with this asap.



i changed comuters same error, what to do?!??!
Reply
#5

26 errors are usually accompanied by a missing bracket,you can check for a missing bracket.
Reply
#6

Quote:
Originally Posted by mahdi499
Посмотреть сообщение
26 errors are usually accompanied by a missing bracket,you can check for a missing bracket.
I will check.

In first look the strtok is fine because there is a


Код:
new cmd[256], idx;
cmd= strtok(cmdtext, idx);
and other is the format of:
Код:
if(strcmp(cmd, "/kick", true) == 0)
{
    //some shit here
}


YEsterday I had no errors and i modified the script. Today without modifiing it's doing this shit. I even went to the old thingy without me doing anything on it, and it gives me this crap with a few hundred of "Loose interlation" warnings.....



SO what to do?
Reply
#7

Sorry for double posting but I added this on the bottom of the 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;
}
it seems to work now i got only 46 warnings,



The GameMode/Script works now. Thanks for those who tryed to help me!





(Case Closed)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)