So I'm not really a developer by trade. I took a few programming courses 25 years ago and haven't really done any serious coding since then.
I'm not sure which language Sourcepawn is closest to, but I'm tempted to pick up a decent beginner programming book and learning it properly. For the moment I'm dipping my toes in the water and trying to learn basics by updating many of the plugins I'm currently testing to new syntax. I've updated dozens with no issues. Then I tried to tackle STAMM, which is 45 plugins plus various includes. And of that project, I can get 44 out of 45 to compile just with #pragma newdecls required.
But I'm struggling to update cstrike_weapons.inc for some reason.
Here is that include file as I've attempted to update it:
https://pastebin.com/rrfnhPsY
Code:
SourcePawn Compiler 1.10.0.6490
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2018 AlliedModders LLC
C:\tf2_server\tf\addons\sourcemod\scripting\include\cstrike_weapons.inc(231) : error 117: enum structs cannot be indexed as arrays
C:\tf2_server\tf\addons\sourcemod\scripting\include\cstrike_weapons.inc(309) : error 117: enum structs cannot be indexed as arrays
C:\tf2_server\tf\addons\sourcemod\scripting\include\cstrike_weapons.inc(314) : error 117: enum structs cannot be indexed as arrays
stamm_no_restrict.sp(37) : warning 241: Array-based enum structs will be removed in 1.11. See https://wiki.alliedmods.net/SourcePawn_Transitional_Syntax#Enum_Structs
3 Errors.
Three three errors are similiar lines:
SetTrieArray(hWeaponInfoTrie,
weaponNames[WeaponID:i] , info[0], _:WeaponInfo);
As for that warning, I've converted other enums to enum structs, but stamm_no_restrict.sp(37) is referencing enum WeaponID which looks to have fixed values and shouldn't need to be a struct as far as I can tell, and I attempt to change it to an enum struct then a lot more breaks.