SA-MP Forums Archive
++REP - 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: ++REP (/showthread.php?tid=582295)



++REP - Mariciuc223 - 19.07.2015

SOLVED


AW: ++REP - Mencent - 19.07.2015

Hello!

What doesn't work exactly?
Can you give us more information about the problem?

- Mencent


Re: ++REP - Mariciuc223 - 19.07.2015

Yes , sorry ... i can say there work nothing ..... That show me the message and that all ... Don't write in the file and i belive that dont load me nothing from ini ... Pastebin : REMOVED

Edit: That don't give me no error or warning .


AW: ++REP - Mencent - 19.07.2015

Well.

PHP код:
public SetPlayerDriverLicense(playerid)
{
    
getdate(YearMonthDay);
    
gettime(HourMinuteSecond);
    
Day += 30;
    while(
Day >= MonthDays[Month])Month++;
    while(
Month >= 12)
    {
        
Year++;
        
Month -= 12;
    }
    
pLicense[playerid][pDriver] = 1;
    
pLicense[playerid][pDriverLY] = Year;
    
pLicense[playerid][pDriverLM] = Month;
    
pLicense[playerid][pDriverLD] = Day;
    
pLicense[playerid][pDriverLH] = Hour;
    
pLicense[playerid][pDriverLMIN] = Minute;
    
pLicense[playerid][pDriverLS] = Second;
    new 
INI:File INI_Open(UserPath(playerid));
    
printf("UserPath: %s",UserPath(playerid));
    
printf("DriverLicense_Year: %i",Year);
    
INI_SetTag(File"Licenses");
    
INI_WriteInt(File"DriverLicense"1);
    
INI_WriteInt(File"DriverLicense_Year"Year);
    
INI_WriteInt(File"DriverLicense_Month"Month);
    
INI_WriteInt(File"DriverLicense_Day"Day);
    
INI_WriteInt(File"DriverLicense_Hour"Hour);
    
INI_WriteInt(File"DriverLicense_Minute"Minute);
    
INI_WriteInt(File"DriverLicense_Second"Second);
    
INI_Close(File);

What are printing here? (UserPath: & DriverLicense_Year

- Mencent


Re: ++REP - Mariciuc223 - 19.07.2015

SetPlayerDriverLicense and that publics are the problem i think ... before that the FS worked well ..


AW: ++REP - Mencent - 19.07.2015

Yes, I put into this function (SetPlayerDriverLicense) two printf's.
Can you send me the code, if this function was called?

- Mencent


Re: AW: ++REP - Mariciuc223 - 19.07.2015

Quote:
Originally Posted by Mencent
Посмотреть сообщение
Yes, I put into this function (SetPlayerDriverLicense) two printf's.
Can you send me the code, if this function was called?

- Mencent
What code ? I give all FS :P

I think you mean where it's used ? On CMD:agl and OnPlayerEnterRaceCheckpoint(playerid) ..


AW: ++REP - Mencent - 19.07.2015

Yes, but if you will give you the drivers license, the function SetPlayerDriverLicense will called. Then start two print's.
In the parameter "License ID" you have to put the number 1.

What is printing in the console? (server-log.txt).

- Mencent


Re: ++REP - Mariciuc223 - 19.07.2015

Nothing .. No prints ... (Empty Gamemode - Just that FS)


AW: ++REP - Mencent - 19.07.2015

And now?
PHP код:
public SetPlayerDriverLicense(playerid)
{
    
printf("DEBUG: 1");
    
getdate(YearMonthDay);
    
gettime(HourMinuteSecond);
    
Day += 30;
    
printf("DEBUG: 2");
    while(
Day >= MonthDays[Month])Month++;
    
printf("DEBUG: 3");
    while(
Month >= 12)
    {
        
Year++;
        
Month -= 12;
    }
    
printf("DEBUG: 4");
    
pLicense[playerid][pDriver] = 1;
    
pLicense[playerid][pDriverLY] = Year;
    
pLicense[playerid][pDriverLM] = Month;
    
pLicense[playerid][pDriverLD] = Day;
    
pLicense[playerid][pDriverLH] = Hour;
    
pLicense[playerid][pDriverLMIN] = Minute;
    
pLicense[playerid][pDriverLS] = Second;
    new 
INI:File INI_Open(UserPath(playerid));
    
printf("UserPath: %s",UserPath(playerid));
    
printf("DriverLicense_Year: %i",Year);
    
INI_SetTag(File"Licenses");
    
INI_WriteInt(File"DriverLicense"1);
    
INI_WriteInt(File"DriverLicense_Year"Year);
    
INI_WriteInt(File"DriverLicense_Month"Month);
    
INI_WriteInt(File"DriverLicense_Day"Day);
    
INI_WriteInt(File"DriverLicense_Hour"Hour);
    
INI_WriteInt(File"DriverLicense_Minute"Minute);
    
INI_WriteInt(File"DriverLicense_Second"Second);
    
INI_Close(File);
    
printf("DEBUG: End");

- Mencent