alliedmodders / sourcepawn

A small, statically typed scripting language.
Other
362 stars 62 forks source link

False warnings 203: symbol is never used & 213: tag mismatch #851

Closed dragokas closed 1 year ago

dragokas commented 1 year ago

It looks like parsing of this file is completely broken.

All warnings are false positive:

SourcePawn Compiler 1.11.0.6905
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2021 AlliedModders LLC

H:\_To_games\Left4Dead_2\My_mods\Discoball\1.5\disco.Fork.sp(131) : warning 217: inconsistent indentation (did you mix t
abs and spaces?)
H:\_To_games\Left4Dead_2\My_mods\Discoball\1.5\disco.Fork.sp(132) : warning 217: inconsistent indentation (did you mix t
abs and spaces?)
H:\_To_games\Left4Dead_2\My_mods\Discoball\1.5\disco.Fork.sp(150) : warning 217: inconsistent indentation (did you mix t
abs and spaces?)
H:\_To_games\Left4Dead_2\My_mods\Discoball\1.5\disco.Fork.sp(151) : warning 217: inconsistent indentation (did you mix t
abs and spaces?)
H:\_To_games\Left4Dead_2\My_mods\Discoball\1.5\disco.Fork.sp(256) : warning 203: symbol is never used: "client"
H:\_To_games\Left4Dead_2\My_mods\Discoball\1.5\disco.Fork.sp(413) : warning 213: tag mismatch (expected "float", got "in
t")
Code size:         24160 bytes
Data size:         141096 bytes
Stack/heap size:      16800 bytes
Total requirements:  182056 bytes

6 Warnings.

disco.Fork.zip

JoinedSenses commented 1 year ago

Gist for anyone who doesnt wanna download the zip:

https://gist.github.com/JoinedSenses/f9b9f322c23c0210578ed73eff0dcca6

JoinedSenses commented 1 year ago

Warning at line 131/132 appears correct. There is an additional (inconsistent) tab on line 131.

Warning at line 150/151 appears correct. There is an additional (inconsistent) tab on line 150.

Warning at line 256 appears correct, client is never used.

Warning at line 413 appears correct. Num is a float but RoundFloat returns int. Num = float(RoundFloat(Num)); resolves that issue. (or change type to int if that is the intention)

dragokas commented 1 year ago

ahh, just noticed it is outdated (old-syntax version). Perhaps, it has no sense. Issue may be closed.

@JoinedSenses, thanks.

dragokas commented 1 year ago

@JoinedSenses, yeah, for some reason I compiled 1 version, at the time when other (updated) version was open in my editor. And by coincidence all line numbers in warning message are nicely match with updated version lines where such errors aren't more exist.

Sorry for disturbing.