sscanf2 problem - 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)
+--- Thread: sscanf2 problem (
/showthread.php?tid=611889)
sscanf2 problem -
alekschowee - 11.07.2016
Код:
C:\Users\ASUS\Desktop\ВСИЧКО\minch\pawno\include\sscanf2.inc(43) : warning 235: public function lacks forward declaration (symbol "OnFilterScriptInit")
C:\Users\ASUS\Desktop\ВСИЧКО\minch\pawno\include\sscanf2.inc(46) : error 017: undefined symbol "GetMaxPlayers"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\pawno\include\sscanf2.inc(46) : error 029: invalid expression, assumed zero
C:\Users\ASUS\Desktop\ВСИЧКО\minch\pawno\include\sscanf2.inc(46) : warning 215: expression has no effect
C:\Users\ASUS\Desktop\ВСИЧКО\minch\pawno\include\sscanf2.inc(47) : error 017: undefined symbol "funcidx"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\pawno\include\sscanf2.inc(47) : warning 215: expression has no effect
C:\Users\ASUS\Desktop\ВСИЧКО\minch\pawno\include\sscanf2.inc(47) : error 001: expected token: ";", but found ")"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\pawno\include\sscanf2.inc(47) : error 029: invalid expression, assumed zero
C:\Users\ASUS\Desktop\ВСИЧКО\minch\pawno\include\sscanf2.inc(47) : fatal error 107: too many error messages on one line
Re: sscanf2 problem -
Vince - 11.07.2016
Include a_samp first.
Re: sscanf2 problem -
alekschowee - 11.07.2016
Код:
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(719) : warning 217: loose indentation
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3727) : error 017: undefined symbol "strtok"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3727) : error 033: array must be indexed (variable "tmp")
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3726) : warning 203: symbol is never used: "idx"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3746) : error 017: undefined symbol "strtok"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3746) : error 033: array must be indexed (variable "tmp")
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3745) : warning 203: symbol is never used: "idx"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3765) : error 017: undefined symbol "strtok"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3765) : error 033: array must be indexed (variable "tmp")
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3764) : warning 203: symbol is never used: "idx"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3784) : error 017: undefined symbol "strtok"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3784) : error 033: array must be indexed (variable "tmp")
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3783) : warning 203: symbol is never used: "idx"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3803) : error 017: undefined symbol "strtok"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3803) : error 033: array must be indexed (variable "tmp")
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3802) : warning 203: symbol is never used: "idx"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3846) : error 017: undefined symbol "strtok"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3846) : error 033: array must be indexed (variable "cmd")
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3962) : error 017: undefined symbol "strtok"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3962) : error 033: array must be indexed (variable "tmp")
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3976) : error 017: undefined symbol "strtok"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(3976) : error 033: array must be indexed (variable "tmp")
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(4394) : error 017: undefined symbol "strtok"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(4394) : error 033: array must be indexed (variable "tmp")
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(4441) : error 017: undefined symbol "strtok"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(4441) : error 033: array must be indexed (variable "tmp")
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(4639) : error 017: undefined symbol "strtok"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(4639) : error 033: array must be indexed (variable "tmp")
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(4739) : error 017: undefined symbol "strtok"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(4739) : error 033: array must be indexed (variable "tmp")
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(4748) : error 017: undefined symbol "strtok"
C:\Users\ASUS\Desktop\ВСИЧКО\minch\gamemodes\gangwars4.pwn(4748) : error 033: array must be indexed (variable "tmp")
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
26 Errors.
Re: sscanf2 problem -
TakeiT - 11.07.2016
add the STRTOK function to your script somewhere.
Код:
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;
}
I don't recommend using OnPlayerCommandText w/ strtok, however.