Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
PHP Notice: Array to string conversion in web\php\games.php on line 85
PHP Fatal error: Uncaught Error: Cannot use string offset as an array in web\php\games.php:88
Stack trace:
#0 web\php\config.php(32): require()
#1 web\php\status.php(34): require('SZ\\update\\web...')
#2 {main}
thrown in web\php\games.php on line 88
<?xml version="1.0" encoding="UTF-8"?>
<config>
<steamcmd>
<steamcmddir>C:\steamcmd\steamcmd.exe</steamcmddir>
<xcopy>true</xcopy>
<email/>
</steamcmd>
<server appid="730">
<installdir>C:\server\csgo-surf-1</installdir>
<ip>X.X.X.X</ip>
<port>27015</port>
<fname>[1]CSGO-Surf-1</fname>
<maxplayers>64</maxplayers>
<cmd>-maxplayers_override 64 +exec autoexec.cfg +game_type 0 +game_mode 1 +tv_enable 1 -autoupdate -net_port_try 1</cmd>
<rcon_say>sm_hsay</rcon_say>
</server>
<server appid="730">
<installdir>C:\server\c-csgo-1</installdir>
<ip>X.X.X.X</ip>
<port>27016</port>
<fname>[C1]CSGO-CUSTOM-1</fname>
<map>de_dust2</map>
<maxplayers>32</maxplayers>
<cmd>-maxplayers_override 32 +map de_dust2 +exec autoexec.cfg +game_type 0 +game_mode 1 -usercon +sv_setsteamaccount XXXXXX -net_port_try 1 -autoupdate -tickrate 128</cmd>
<rcon_say>sm_hsay</rcon_say>
</server>
<server appid="730">
<installdir>C:\server\c-csgo-2</installdir>
<ip>X.X.X.X</ip>
<port>27018</port>
<fname>[C2]CSGO-CUSTOM-2</fname>
<maxplayers>32</maxplayers>
<cmd>-maxplayers_override 32 +exec autoexec.cfg -usercon -autoupdate -tickrate 128 +exec autoexec.cfg +game_type 3 +game_mode 0 -net_port_try 1</cmd>
<rcon_say>sm_hsay</rcon_say>
</server>
</config>
object(SimpleXMLElement)#13 (4) {
["@attributes"]=>
array(1) {
["appid"]=>
string(4) "4000"
}
["name"]=>
string(11) "Garry's Mod"
["game"]=>
string(9) "garrysmod"
["server"]=>
string(4) "4020"
}
object(SimpleXMLElement)#12 (4) {
["@attributes"]=>
array(1) {
["appid"]=>
string(3) "730"
}
["name"]=>
string(32) "Counter-Strike: Global Offensive"
["game"]=>
string(4) "csgo"
["server"]=>
string(3) "740"
}
... continues with games...
Array to string conversion exception with PHP 7
Theese tests was made with PHP 7.1 and APACHE 2.4.9
Code:PHP Notice: Array to string conversion in web\php\games.php on line 85 PHP Fatal error: Uncaught Error: Cannot use string offset as an array in web\php\games.php:88 Stack trace: #0 web\php\config.php(32): require() #1 web\php\status.php(34): require('SZ\\update\\web...') #2 {main} thrown in web\php\games.php on line 88
So i looked for it and:
there something worng...![]()
EDIT1:
Heres my XML
EDIT2:Code:<?xml version="1.0" encoding="UTF-8"?> <config> <steamcmd> <steamcmddir>C:\steamcmd\steamcmd.exe</steamcmddir> <xcopy>true</xcopy> <email/> </steamcmd> <server appid="730"> <installdir>C:\server\csgo-surf-1</installdir> <ip>X.X.X.X</ip> <port>27015</port> <fname>[1]CSGO-Surf-1</fname> <maxplayers>64</maxplayers> <cmd>-maxplayers_override 64 +exec autoexec.cfg +game_type 0 +game_mode 1 +tv_enable 1 -autoupdate -net_port_try 1</cmd> <rcon_say>sm_hsay</rcon_say> </server> <server appid="730"> <installdir>C:\server\c-csgo-1</installdir> <ip>X.X.X.X</ip> <port>27016</port> <fname>[C1]CSGO-CUSTOM-1</fname> <map>de_dust2</map> <maxplayers>32</maxplayers> <cmd>-maxplayers_override 32 +map de_dust2 +exec autoexec.cfg +game_type 0 +game_mode 1 -usercon +sv_setsteamaccount XXXXXX -net_port_try 1 -autoupdate -tickrate 128</cmd> <rcon_say>sm_hsay</rcon_say> </server> <server appid="730"> <installdir>C:\server\c-csgo-2</installdir> <ip>X.X.X.X</ip> <port>27018</port> <fname>[C2]CSGO-CUSTOM-2</fname> <maxplayers>32</maxplayers> <cmd>-maxplayers_override 32 +exec autoexec.cfg -usercon -autoupdate -tickrate 128 +exec autoexec.cfg +game_type 3 +game_mode 0 -net_port_try 1</cmd> <rcon_say>sm_hsay</rcon_say> </server> </config>
Now if i save it like this:
![]()
this code will output:
this is actually working !but!Code:object(SimpleXMLElement)#13 (4) { ["@attributes"]=> array(1) { ["appid"]=> string(4) "4000" } ["name"]=> string(11) "Garry's Mod" ["game"]=> string(9) "garrysmod" ["server"]=> string(4) "4020" } object(SimpleXMLElement)#12 (4) { ["@attributes"]=> array(1) { ["appid"]=> string(3) "730" } ["name"]=> string(32) "Counter-Strike: Global Offensive" ["game"]=> string(4) "csgo" ["server"]=> string(3) "740" } ... continues with games...
The actually bad guy is here
![]()
its on some way not working well.. its doing this:
![]()
With regards
update for php 8+
Remove WMIC
Option to automatically add Metamod in gameinfo.gi (CS2 after update)
Option to set environnement path if server runs in background (Workshop dll dependency)