[HELP] Need help with rank system - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Need help with rank system (
/showthread.php?tid=115764)
[HELP] Need help with rank system -
vludraiz - 25.12.2009
Hello, im from Argentina, im using
sananmoneygrub0.5 with some adds of me, its for a DM server, and i want to Add a rank system, especially the Sandra's rank system, but im gettin the strlok already defined error.
I have read many posts of this error, but i couldnt solve it, please help me.
This is my GM code
http://pastebin.com/m7551c40b
Error @ PAWNO
[code=pawno]
C:\Users\Fourmentel\Desktop\Juegos\ServerSAMP\game modes\sananmoneygrub0.5.pwn(2712) : error 021: symbol already defined: "strtok"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
[/code]
Please help me.
Re: [HELP] Need help with rank system -
MadeMan - 25.12.2009
Go to line 2712. You see strtok function there. Delete it.
Re: [HELP] Need help with rank system -
vludraiz - 25.12.2009
Yes, but if i delete it , my PWNO crashes, its appear a windows error.. :S
Re: [HELP] Need help with rank system -
vludraiz - 25.12.2009
Look now i have delete that line, (( in that line, there was a "{" .. only that ))
Quote:
2718 }
2719
2720 strtok(const string[], &index)
2721 {
|
And the i delete it, pawno get this errors.
Quote:
C:\Users\Fourmentel\Desktop\Juegos\ServerSAMP\game modes\sananmoneygrub0.5.pwn(2722) : error 021: symbol already defined: "strtok"
C:\Users\Fourmentel\Desktop\Juegos\ServerSAMP\game modes\sananmoneygrub0.5.pwn(2722) : error 003: declaration of a local variable must appear in a compound block
C:\Users\Fourmentel\Desktop\Juegos\ServerSAMP\game modes\sananmoneygrub0.5.pwn(2720) : error 010: invalid function or declaration
C:\Users\Fourmentel\Desktop\Juegos\ServerSAMP\game modes\sananmoneygrub0.5.pwn(2720 -- 2723) : fatal error 107: too many error messages on one line
|
PD: Thanks for the reply
Re: [HELP] Need help with rank system -
MadeMan - 25.12.2009
pawn Код:
public SendAllFormattedText(playerid, const str[], define)
{
new tmpbuf[256];
format(tmpbuf, sizeof(tmpbuf), str, define);
SendClientMessageToAll(0xFFFF00AA, tmpbuf);
}
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;
}
isStringSame(const string1[], const string2[], len) {
for(new i = 0; i < len; i++) {
if(string1[i]!=string2[i])
return 0;
if(string1[i] == 0 || string1[i] == '\n')
return 1;
}
return 1;
}
Delete the whole block. So it looks like this:
pawn Код:
public SendAllFormattedText(playerid, const str[], define)
{
new tmpbuf[256];
format(tmpbuf, sizeof(tmpbuf), str, define);
SendClientMessageToAll(0xFFFF00AA, tmpbuf);
}
isStringSame(const string1[], const string2[], len) {
for(new i = 0; i < len; i++) {
if(string1[i]!=string2[i])
return 0;
if(string1[i] == 0 || string1[i] == '\n')
return 1;
}
return 1;
}
Re: [HELP] Need help with rank system -
vludraiz - 25.12.2009
yes,, its works!!!
thanks!!!!!!!!!!!