07.11.2009, 04:48
Hello, I have just started to learn Pawn coding. I took TGP Gamemode found here and found may errors. (Most where about array size not matching, which I was able to fix by using skills I picked up from school when I learned VB and VC, and using the Wiki.) Now I get these errors.
And it points me to here.
Now I did some random test which included reming this out when I did that I could register but not login. also I could spawn but with no money, which if I am correct from what I saw in the scripting you do start with money.
I know I have to remove a strtok but i have no clue from where.
Код:
C:\Users\Randall\Downloads\samp\TPG Roleplay\TPG Roleplay\gamemodes\TPGSERVER.pwn(11600) : error 021: symbol already defined: "strtok" C:\Users\Randall\Downloads\samp\TPG Roleplay\TPG Roleplay\gamemodes\TPGSERVER.pwn(11615) : error 047: array sizes do not match, or destination array is too small
Код:
stock strtok(const string[], &index,seperator=' ') { new length = strlen(string); new offset = index; new result[256]; while ((index < length) && (string[index] != seperator) && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = string[index]; index++; } result[index - offset] = EOS; if ((index < length) && (string[index] == seperator)) { index++; } return result; }
I know I have to remove a strtok but i have no clue from where.