CMD:test(playerid,params[]){
new Hour, Second, Minute, Day, Month, Year;
gettime(Hour,Second,Minute);
getdate(Day, Month, Year);
format(String, sizeof(String),"Time: %i:%i:%i | Date: %i/%i/%i",Hour,Minute,Second,Day,Month,Year);
MSG(playerid,C_RED,String);
return 1;}
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(812) : warning 219: local variable "Hour" shadows a variable at a preceding level
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(812) : warning 219: local variable "Second" shadows a variable at a preceding level
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(812) : warning 219: local variable "Minute" shadows a variable at a preceding level
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(812) : warning 219: local variable "Day" shadows a variable at a preceding level
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(812) : warning 219: local variable "Month" shadows a variable at a preceding level
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(812) : warning 219: local variable "Year" shadows a variable at a preceding level
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(813) : error 035: argument type mismatch (argument 1)
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(814) : error 035: argument type mismatch (argument 1)
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(815) : warning 213: tag mismatch
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(815) : warning 213: tag mismatch
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(815) : warning 213: tag mismatch
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(815) : warning 213: tag mismatch
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(815) : warning 213: tag mismatch
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(815) : warning 213: tag mismatch
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(812) : warning 203: symbol is never used: "Year"
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(812) : warning 203: symbol is never used: "Month"
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(812) : warning 203: symbol is never used: "Day"
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(812) : warning 203: symbol is never used: "Minute"
C:\Users\Lirbo\Desktop\GRRP\gamemodes\Register.pwn(812) : warning 203: symbol is never used: "Second"
warning 219: local variable "Year" shadows a variable at a preceding level
CMD:test(playerid,params[]){
gettime(Hour,Second,Minute);
getdate(Day, Month, Year);
format(String, sizeof(String),"Time: %i:%i:%i | Date: %i/%i/%i",Hour,Minute,Second,Day,Month,Year);
MSG(playerid,C_RED,String);
return 1;}
CMD:test(playerid,params[])
{
new Hour2,Second2,Minute2,Day2,Month2,Year2,String[145];
gettime(Hour2,Second2,Minute2);
getdate(Day2,Month2,Year2);
format(String,sizeof String,"Time: %i:%i:%i | Date: %02d/%02d/%i",Hour2,Minute2,Second2,Day2,Month2,Year2);
MSG(playerid,C_RED,String);
return 1;
}
In your script, instead of %i use %02d. Also, you have not made a new string, so add String[256]; to new.
|
In your script, instead of %i use %02d. Also, you have not made a new string, so add String[256]; to new.
|
Unless you want to waste your memory use it...
That's very bad advice , why using 256 instead of less + he's not sending a big message , it's just waste of kilobytes |
Unless you want to waste your memory use it...
That's very bad advice , why using 256 instead of less + he's not sending a big message , it's just waste of kilobytes |
Hello!
Try this: PHP код:
|
256 bits = 32 bytes to be exact, which is 0.032 kilobytes. It's not a lot. Though, it's something you can easily avoid and should avoid.
|