String error - 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: String error (
/showthread.php?tid=422917)
String error -
raamiix - 15.03.2013
How to fix this:
Код:
C:\Users\Ramin\Desktop\PL-RP\gamemodes\PL-RP.pwn(7717) : error 017: undefined symbol "string"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Код:
WristWatch = TextDrawCreate(577.000000, 50.000000, string);
TextDrawAlignment(WristWatch, 2);
TextDrawBackgroundColor(WristWatch, 255);
TextDrawFont(WristWatch, 3);
TextDrawLetterSize(WristWatch, 0.709998, 2.100001);
TextDrawColor(WristWatch, -1);
TextDrawSetOutline(WristWatch, 1);
TextDrawSetProportional(WristWatch, 0);
textdrawscount++;
Re: String error -
DiGiTaL_AnGeL - 15.03.2013
EDIT : You also need to format that string,
Re: String error -
P3DRO - 15.03.2013
you are creating a textdraw, pls tell me what you would you like to be the text that appears? cuz now you are refering to a string that doesnt exist, if you want to appear the word string just do
Код:
WristWatch = TextDrawCreate(577.000000, 50.000000, "string");
Re: String error -
raamiix - 15.03.2013
Quote:
Originally Posted by DiGiTaL_AnGeL
EDIT : You also need to format that string,
|
How?
Re: String error -
DiGiTaL_AnGeL - 15.03.2013
Click.
Re: String error -
[ABK]Antonio - 15.03.2013
If you're going to have it use 12-hour clock on that string, you could use this if you want
pawn Код:
//This will display 12-hour clock instead of 24-hour clock.
format(string, sizeof(string), "%02d:%02d %s", hour>(12)?(hour-12):(hour), minute, hour>(12)?("P.M."):("A.M."));
EDIT: Well, forgot
pawn Код:
new hour, minute, sec;
gettime(hour, minute, sec);