I'm in the process of upgrading my code to the new declarations. I changed it to the 'new version' below and got unintended results. Can you tell me what the code should look like with new declarations?
Old version (works fine):
PHP Code:
public EventInventoryApplication(Handle:event, const String:name[], bool:dontBroadcast)
{
new String:strItemsindex[5][65];
new strItem[5];
strItem[0] = StringToInt(strItemsindex[0]);
strItem[1] = StringToInt(strItemsindex[1]);
strItem[2] = StringToInt(strItemsindex[2]);
strItem[3] = StringToInt(strItemsindex[3]);
strItem[4] = StringToInt(strItemsindex[4]);
New version (doesn't work):
PHP Code:
public Action EventInventoryApplication(Handle event, const char[] name, bool dontBroadcast)
{
char strItemsindex[5][65];
char strItem[5];
strItem[0] = StringToInt(strItemsindex[0]);
strItem[1] = StringToInt(strItemsindex[1]);
strItem[2] = StringToInt(strItemsindex[2]);
strItem[3] = StringToInt(strItemsindex[3]);
strItem[4] = StringToInt(strItemsindex[4]);