splewis / get5

CS:GO Sourcemod plugin for competitive matches/scrims
GNU General Public License v3.0
557 stars 175 forks source link

get5.inc cannot be included as a standalone file #840

Closed splewis closed 2 years ago

splewis commented 2 years ago

A plugin simply including get5.inc (example) cannot compile since get5.inc uses files defined elsewhere (get5/util.sp):

/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(170) : error 017: undefined symbol "ConvertGet5SideToStringInJson"
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(170) : error 092: number of arguments does not match definition
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(195) : error 017: undefined symbol "ConvertGameStateToStringInJson"
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(195) : error 092: number of arguments does not match definition
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(296) : error 017: undefined symbol "ConvertGet5SideToStringInJson"
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(296) : error 092: number of arguments does not match definition
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(307) : error 017: undefined symbol "ConvertGet5TeamToStringInJson"
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(307) : error 092: number of arguments does not match definition
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(328) : error 017: undefined symbol "ConvertGet5SideToStringInJson"
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(328) : error 092: number of arguments does not match definition
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(442) : error 017: undefined symbol "ConvertGet5TeamToStringInJson"
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(442) : error 092: number of arguments does not match definition
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(475) : error 017: undefined symbol "ConvertGet5TeamToStringInJson"
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(475) : error 092: number of arguments does not match definition
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(634) : error 017: undefined symbol "ConvertGameStateToStringInJson"
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(634) : error 092: number of arguments does not match definition
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(711) : error 017: undefined symbol "ConvertGet5SideToStringInJson"
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(711) : error 092: number of arguments does not match definition
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(778) : error 017: undefined symbol "ConvertGameStateToStringInJson"
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(778) : error 092: number of arguments does not match definition
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(789) : error 017: undefined symbol "ConvertGameStateToStringInJson"
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(789) : error 092: number of arguments does not match definition
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(855) : error 017: undefined symbol "ConvertGet5SideToStringInJson"
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(855) : error 092: number of arguments does not match definition
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(889) : error 017: undefined symbol "ConvertGet5PauseTypeToStringInJson"
/var/lib/jenkins/workspace/csgo-practice-mode/tmp/addons/sourcemod/scripting/include/get5.inc(889) : error 092: number of arguments does not match definition

This should be fixed.

nickdnk commented 2 years ago

I'll fix this asap.

nickdnk commented 2 years ago

There is no case where these are not compiled, as they are used in the the .inc file itself. If we add stock, all we get is that we lose the compiler warning in case we someday don't use one of the functions.

splewis commented 2 years ago

Hm, yeah, I guess the calls in the merhodmaps get compiled into other plugins no matter what then - looks good to me.