SA-MP Forums Archive
Simple warning - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Simple warning (/showthread.php?tid=369112)



Simple warning - DR3AD - 15.08.2012

pawn Код:
enum SInfo
{
    Float:SpawnX,
    Float:SpawnY,
    Float:SpawnZ
}  
new SpawnInfo[MAX_DEFAULT_SPAWNS][SInfo];
the function
pawn Код:
new pName[24];
    new Float: parameter;
    GetPlayerName(playerid, pName, sizeof(pName));
    new SpawnID = udb_UserInt(pName, "Spawn");
    if(coord == 'X')
        parameter = SpawnInfo[SpawnID][SpawnX];
    else if(coord == 'Y')
        parameter = SpawnInfo[SpawnID][SpawnY];
    else if(coord == 'Z')
        parameter = SpawnInfo[SpawnID][SpawnZ];
    return parameter;
The warning : (128 ) : warning 213: tag mismatch (line of the return)


Re: Simple warning - Vince - 15.08.2012

Prefix the name of your function with the Float: tag. If you subsequently get a warning about 'forcing reparse', then also add a forward declaration.


Re: Simple warning - DR3AD - 15.08.2012

omgg, looooooool.. thanks man
This language should have this type of things for all primitive types at least.. int, float, char
Like java and others