SA-MP Forums Archive
Small help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Small help (/showthread.php?tid=598935)



Small help - Lucas_HenryK - 18.01.2016

PHP код:
num ServerInfo {
    
Ping,
    
Fps,
    
Float:Packetloss,
    
    
SV_NAME[50] = "asdsadsad",
    
GM_NAME[25] = "asdsadsad",
    
GM_MAPN[15] = "asdsadasd",
    
GM_SITE[20] = "asdsadasd",
    
GM_LANG[15] = "asdsadasd"
}
new 
sData[ServerInfo]; 
Error: error 008: must be a constant expression; assumed zero

At lines with stringsize


Re: Small help - Vince - 18.01.2016

Enumerators are not arrays and you cannot assign a default value to them.


Re: Small help - Lucas_HenryK - 18.01.2016

Quote:
Originally Posted by Vince
Посмотреть сообщение
Enumerators are not arrays and you cannot assign a default value to them.
How i can fix it so ?


Re: Small help - radiobizza - 18.01.2016

replace with this:
PHP код:
num ServerInfo 
    
Ping
    
Fps
    
Float:Packetloss

new 
sData[ServerInfo];  
SV_NAME[50] = "asdsadsad"
GM_NAME[25] = "asdsadsad"
GM_MAPN[15] = "asdsadasd"
GM_SITE[20] = "asdsadasd"
GM_LANG[15] = "asdsadasd"