SA-MP Forums Archive
Error only 1 - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Error only 1 (/showthread.php?tid=158998)



Error only 1 - Erkan - 11.07.2010

How to get this work?

new text1[20];
if(PlayerData[playerid][Haircut] < 0) { text1 =PlayerData[playerid][Haircut]; }
else { text1 = "None";


Re: Error only 1 - Erkan - 11.07.2010

Any one?!?


Re: Error only 1 - MisterTickle - 11.07.2010

if(!strlen(PlayerData[playerid][Haircut])) return format(PlayerData[playerid][Haircut], 20, text1);
else return format(text1, 20, "None");

if theirs more in the command or whatever it is, Don't use returns and use { } to close statements but continue.


Re: Error only 1 - [LSB]TheGame - 13.07.2010

Works but when try changing the "None" using a command doesnt change


Re: Error only 1 - Erkan - 14.07.2010

Hmm, how we could fix that?