MyJailbreak icon indicating copy to clipboard operation
MyJailbreak copied to clipboard

[PlayerTags] Edit enum to enum struct

Open Hexer10 opened this issue 4 years ago • 1 comments

Right now the build on sm 1.11 fails:

Compile addons/sourcemod/scripting/MyJailbreak/playertags.sp
addons/sourcemod/scripting/MyJailbreak/playertags.sp(89) : error 101: specify either all dimensions or only the last dimension
addons/sourcemod/scripting/MyJailbreak/playertags.sp(90) : error 101: specify either all dimensions or only the last dimension
addons/sourcemod/scripting/MyJailbreak/playertags.sp(543) : error 163: indeterminate array size in "sizeof" expression (symbol "g_sStatsTag")
addons/sourcemod/scripting/MyJailbreak/playertags.sp(544) : error 163: indeterminate array size in "sizeof" expression (symbol "g_sStatsTag")
addons/sourcemod/scripting/MyJailbreak/playertags.sp(545) : error 163: indeterminate array size in "sizeof" expression (symbol "g_sStatsTag")
addons/sourcemod/scripting/MyJailbreak/playertags.sp(546) : error 163: indeterminate array size in "sizeof" expression (symbol "g_sStatsTag")
addons/sourcemod/scripting/MyJailbreak/playertags.sp(547) : error 163: indeterminate array size in "sizeof" expression (symbol "g_sStatsTag")
addons/sourcemod/scripting/MyJailbreak/playertags.sp(549) : error 163: indeterminate array size in "sizeof" expression (symbol "g_sChatTag")
addons/sourcemod/scripting/MyJailbreak/playertags.sp(550) : error 163: indeterminate array size in "sizeof" expression (symbol "g_sChatTag")
addons/sourcemod/scripting/MyJailbreak/playertags.sp(551) : error 163: indeterminate array size in "sizeof" expression (symbol "g_sChatTag")
addons/sourcemod/scripting/MyJailbreak/playertags.sp(552) : error 163: indeterminate array size in "sizeof" expression (symbol "g_sChatTag")
addons/sourcemod/scripting/MyJailbreak/playertags.sp(553) : error 163: indeterminate array size in "sizeof" expression (symbol "g_sChatTag")

The issue is in the following lines: We should migrate the g_eROLES enum to an enum struct https://github.com/shanapu/MyJailbreak/blob/master/addons/sourcemod/scripting/MyJailbreak/playertags.sp#L80-L87

Where it is used: Declare the array using the enum struct as type. https://github.com/shanapu/MyJailbreak/blob/148fccdc6383f3570c1df7b0ff4fcc6d41bcde6d/addons/sourcemod/scripting/MyJailbreak/playertags.sp#L91-L92

https://github.com/shanapu/MyJailbreak/blob/148fccdc6383f3570c1df7b0ff4fcc6d41bcde6d/addons/sourcemod/scripting/MyJailbreak/playertags.sp#L557-L561

Hexer10 avatar Mar 18 '20 17:03 Hexer10