04.02.2014, 22:53
So i trying to add different toy editor system so my toys would save, but when i compile my game i got errors
Lines
PHP код:
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(988) : error 033: array must be indexed (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(989) : error 033: array must be indexed (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(990) : error 033: array must be indexed (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(991) : error 033: array must be indexed (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(992) : error 033: array must be indexed (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(993) : error 033: array must be indexed (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(994) : error 033: array must be indexed (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(995) : error 032: array index out of bounds (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(995) : error 033: array must be indexed (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(996) : error 032: array index out of bounds (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(996) : error 033: array must be indexed (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(997) : error 032: array index out of bounds (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(997) : error 033: array must be indexed (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(998) : error 032: array index out of bounds (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(998) : error 033: array must be indexed (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(999) : error 032: array index out of bounds (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(999) : error 033: array must be indexed (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(1001) : error 033: array must be indexed (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(1002) : error 033: array must be indexed (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(1003) : error 033: array must be indexed (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(1004) : error 033: array must be indexed (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(1004) : error 090: public functions may not return arrays (symbol "LoadToys")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(1005) : error 033: array must be indexed (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(1005) : error 090: public functions may not return arrays (symbol "LoadToys")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(1006) : error 033: array must be indexed (variable "PlayerToyInfo")
C:\Users\Euronics Latvija\Desktop\LCRP\gamemodes\nlrp.pwn(1006) : error 090: public functions may not return arrays (symbol "LoadToys")
PHP код:
orward LoadToys(playerid,name[],value[]);
public LoadToys(playerid,name[],value[])
{
if (!strcmp(name, "ptindex")){ PlayerToyInfo[playerid][ptindex] = strval(value); }
if (!strcmp(name, "ptmodelid")){ PlayerToyInfo[playerid][ptmodelid] = strval(value); }
if (!strcmp(name, "ptboneid")){ PlayerToyInfo[playerid][ptboneid] = strval(value); }
if (!strcmp(name, "ptfOffsetX")){ PlayerToyInfo[playerid][ptfOffsetX] = strval(value); }
if (!strcmp(name, "ptfOffsetY")){ PlayerToyInfo[playerid][ptfOffsetY] = strval(value); }
if (!strcmp(name, "ptfOffsetY")){ PlayerToyInfo[playerid][ptfOffsetZ] = strval(value); }
if (!strcmp(name, "ptfRotX")){ PlayerToyInfo[playerid][ptfRotX] = strval(value); }
if (!strcmp(name, "ptfRotY")){ PlayerToyInfo[playerid][ptfRotY] = strval(value); }
if (!strcmp(name, "ptfRotZ")){ PlayerToyInfo[playerid][ptfRotZ] = strval(value); }
if (!strcmp(name, "ptfScaleX")){ PlayerToyInfo[playerid][ptfScaleX] = strval(value); }
if (!strcmp(name, "ptfScaleY")){ PlayerToyInfo[playerid][ptfScaleY] = strval(value); }
if (!strcmp(name, "ptfScaleZ")){ PlayerToyInfo[playerid][ptfScaleZ] = strval(value); }
INI_Int("ptindex",PlayerToyInfo[playerid][ptindex]);
INI_Int("ptmodelid",PlayerToyInfo[playerid][ptmodelid]);
INI_Int("ptboneid",PlayerToyInfo[playerid][ptboneid]);
INI_Float("ptfOffsetX",PlayerToyInfo[playerid][ptfOffsetX]);
INI_Float("ptfOffsetY",PlayerToyInfo[playerid][ptfOffsetY]);
INI_Float("ptfOffsetZ",PlayerToyInfo[playerid][ptfOffsetZ]);
INI_Float("ptfRotX",PlayerToyInfo[playerid][ptfRotX]);
INI_Float("ptfRotY",PlayerToyInfo[playerid][ptfRotY]);
INI_Float("ptfRotZ",PlayerToyInfo[playerid][ptfRotZ]);
INI_Float("ptfScaleX",PlayerToyInfo[playerid][ptfScaleX]);
INI_Float("ptfScaleY",PlayerToyInfo[playerid][ptfScaleY]);
INI_Float("ptfScaleZ",PlayerToyInfo[playerid][ptfScaleZ]);
return 1;
}