So, I've tried everything but I cant seem to get this damned script to work. The result of this is probally going to be someone replying with a simple answer and me feeling like a total handicap, hahah. Anyway, heres the code snip:
if((%obj.getDataBlock() $= "FridgeBrickData") || (%obj.getDataBlock() $= "GunRackBrickData"))
{
switch(%brick.getDatablock().type)
{
case "food":
%resourcetype = 2;
case "gun":
%resourcetype = 1;
}
%cost = 20;
%foodstock = 11;
%client.player.s_type = "food";
%client.player.s_quantity = %foodstock;
%client.player.s_cost = %cost;
%client.player.s_origin = %brick;
}
Returns an error at ##%##brick.getDatablock().type and at ##%##client.player.s_type = "food". And yes, I have "type" classified in the Datablock's code. This code is also in a function that has %brick and %obj.All the problems in other parts of this script, and somewhat in this code snip except for the text in red. It returns an error at %client.
##p
##layer.s_type = "food";
Thanks for the help in advance.