- Code: Select all
int Inventory[10][8];
void INVEN_AddItem(Actor* myActor)
{
if(!Inventory[9][0])
{
//ERROR HERE
Inventory[9] = {0,0,0,0,0,0,0,0};
}
}
int Inventory[10][8];
void INVEN_AddItem(Actor* myActor)
{
if(!Inventory[9][0])
{
//ERROR HERE
Inventory[9] = {0,0,0,0,0,0,0,0};
}
}
EvanAgain wrote:So only structs (and char arrays) can be set like that
char buffer[30];
char* string;
buffer = "you can't do this";
string = "you can do this"; // because it is a pointer
// it sets the pointer to a place in memory where "you can do this" is stored
// but it is constant and can't be changed
Users browsing this forum: No registered users and 1 guest