min 发表于 2024-8-4 08:42:35

插件代码显示超出范怎么办?

new const CSW_WEAPONS[] ={"CSW_M4A1","CSW_AK47","CSW_AWP","CSW_DEAGLE","CSW_USP","CSW_GLOCK18","CSW_KNIFE","CSW_HEGRENADE","CSW_FLASHBANG","CSW_SMOKEGRENADE" }

这个代码显示超过索引范围,就是武器添加的多了。如何不删武器的情况下解决代码问题

成都玩家? 发表于 2024-8-4 17:32:26

代码传上来 帮你看看

k1nader 发表于 2024-10-11 19:53:18

new const CSW_WEAPONS[][] = {
        "CSW_M4A1",
        "CSW_AK47",
        "CSW_AWP",
        "CSW_DEAGLE",
        "CSW_USP",
        "CSW_GLOCK18",
        "CSW_KNIFE",
        "CSW_HEGRENADE",
        "CSW_FLASHBANG",
        "CSW_SMOKEGRENADE"
}

注意你这是字符串,相当于二维数组要俩个 [][]
页: [1]
查看完整版本: 插件代码显示超出范怎么办?