Posted By: PrenceOfDarkness
Send_var_2 and pointers - 02/17/08 18:18
I know that send_var_2 can't send pointers and I don't want it to. Is there any way for me to send the variable that the pointer is pointing to?
typedef struct sZoneMove
{
var zMove;
var zRotate;
} sZoneMove;
sZoneMove sZone1Move1;
sZoneMove* pZoneMove;
function sendVarZone(sZoneMove* test, var zoneNum)
{
send_var_to(tempEnt,test);
}
function someOtherFunction{
pZoneStruct = my.zoneStruct;
pZoneMove = &sZone1Move1;
sendVarZone(pZoneMove.zMove,my.zone);}
typedef struct sZoneMove
{
var zMove;
var zRotate;
} sZoneMove;
sZoneMove sZone1Move1;
sZoneMove* pZoneMove;
function sendVarZone(sZoneMove *var, var zoneNum)
{
//the crash happens as soon as sendVarZone is called, nothing ever happens in here
}
....
sendVarZone(pZoneMove,my.zone);