Storing in a ENUM interfears with another enum
#1

Hello.

My enum Player[playerid][Nick] get's corrupted once i store float in this enums.
This is so weird, because i am nowhere near this command storing something in the nick.
PHP Code:
    new Float:ox,Float:oy,Float:oz,Float:oa;
    
GetPlayerPos(playerid,ox,oy,oz);
    
GetPlayerFacingAngle(playerid,oa);
    
Player[playerid][Oldx] = ox;
    
Player[playerid][Oldy] = oy;
    
Player[playerid][Oldz] = oz;
    
Player[playerid][Olda] = oa
even tho its nowhere to be found in the code.
Did i do something wrong?



Here is my debug code to test where it is:
PHP Code:
COMMAND:tpto(playeridparams[]) {
    if(!
Player[playerid][Authed] || Player[playerid][Admin] && Player[playerid][Helper]) return SendClientError(playerid"You are not authorised to use this command.");
    new 
target;
    if(
Player[playerid][Helper] && !Player[playerid][HelperDuty]) return SendClientError(playerid,"You arn't on helper duty.");
    if(
sscanf(params"u"target)) return SendClientUsage(playerid"/tpto [playerid]");
    if(!
IsPlayerConnected(target)) return SendClientError(playerid"That player isn't connected.");
    
SendClientMessage(playerid,-1,sprintf("%s",Player[playerid][Nick]));
    new 
Float:ox,Float:oy,Float:oz,Float:oa;
    
GetPlayerPos(playerid,ox,oy,oz);
    
GetPlayerFacingAngle(playerid,oa);
    
Player[playerid][Oldx] = ox;
    
Player[playerid][Oldy] = oy;
    
Player[playerid][Oldz] = oz;
    
Player[playerid][Olda] = oa;
    
SendClientMessage(playerid,-1,sprintf("%s",Player[playerid][Nick]));
     new 
Float:xFloat:yFloat:zGetPlayerPos(targetxyz);
     if(
IsPlayerInAnyVehicle(playerid))
     {
    new 
vid GetPlayerVehicleID(playerid);
     
SetVehiclePos(vidx+3,y,z);
    
SetVehicleVirtualWorld(vidGetPlayerVirtualWorld(target));
    
SetPlayerVirtualWorld(playeridGetPlayerVirtualWorld(target));
     }
    else
    {
    
SetPlayerPos(playeridx+1.5yz);
    
SetPlayerInterior(playeridGetPlayerInterior(target));
    
SetPlayerVirtualWorld(playeridGetPlayerVirtualWorld(target));
    }
    
SendClientMessage(playerid,-1,sprintf("%s",Player[playerid][Nick]));
    
IRC_GroupSay(Group"#adminlogs"sprintf("%s tp'ed to %s."RPName(playerid), RPName(target)));
     return 
1;

What it outputs:

Trace is the correct loading for it.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)