SA-MP Forums Archive
formatting it wrong - 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: formatting it wrong (/showthread.php?tid=452628)



formatting it wrong - _Khaled_ - 22.07.2013

pawn Код:
if(HouseInfo[playerid][hOwner] == 1)
    {
        format(string, sizeof string, ""COLOR_GREEN"Owner: "COLOR_WHITE"%s \n", Name); //error line
        HouseInfo[playerid][hLabel] = Create3DTextLabel(string, COLOR_GREEN, HouseInfo[playerid][hEnterX], HouseInfo[playerid][hEnterZ], HouseInfo[playerid][hEnterZ], 7.0, 0);
        HouseInfo[houseid][hPickup] = CreatePickup(HouseInfo[playerid][hEnterX], HouseInfo[playerid][hEnterY], HouseInfo[playerid][hEnterZ], 2, 0, 0, 0, 20);
    }
Код:
 error 001: expected token: "-string end-", but found "-identifier-"
error 001: expected token: "-string end-", but found "-identifier-"
 warning 215: expression has no effect
error 001: expected token: ";", but found "-integer value-"
 fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: formatting it wrong - PrinceKumar - 22.07.2013

Use it
pawn Код:
format(string, sizeof(string), ""COLOR_GREEN"Owner: "COLOR_WHITE"%s \n", Name);



Re: formatting it wrong - Kar - 22.07.2013

pawn Код:
format(string, sizeof(string), ""#COLOR_GREEN"Owner: "#COLOR_WHITE"%s \n", Name);
Try This ^


Re: formatting it wrong - cessil - 22.07.2013

you haven't shown what your defines are, it might be that your defines are integers and not strings