Help me with replacing old strings
#1

i just knew i was using old strings but i dont know how to replace them
here is one or two of what i use
pawn Код:
sscanf(line, "p<|>s[256]s[30]ds[64]s[64]dds[30]s[64]s[64]",
    ServerMOTD,ServerMOTDSetBy,ServerMaxPlayers,ServerMaxPlayersDate,ServerMaxPlayersTime,ServerTickets,ServerMaxFlightStreak,ServerMaxFlightStreakWinner,ServerMaxFlightStreakDate,ServerMaxFlightStreakTime);
    mysql_free_result();
    sTrackPlayers=1;
here is another one;
pawn Код:
public LoadStuff()
{
    new query[156];
    format(query,sizeof(query),"SELECT * FROM statistics");
    mysql_query(query);
    mysql_store_result();
    new line[1024];
    mysql_fetch_row(line);
    sscanf(line, "p<|>s[256]s[30]ds[64]s[64]dds[30]s[64]s[64]",
    ServerMOTD,ServerMOTDSetBy,ServerMaxPlayers,ServerMaxPlayersDate,ServerMaxPlayersTime,ServerTickets,ServerMaxFlightStreak,ServerMaxFlightStreakWinner,ServerMaxFlightStreakDate,ServerMaxFlightStreakTime);
    mysql_free_result();
    sTrackPlayers=1;
}
i think these old strings are giving me these warnings in server_log
Код:
SA-MP Dedicated Server
----------------------
v0.3x, ©2005-2013 SA-MP Team

[21:50:07] filterscripts = ""  (string)
[21:50:07] 
[21:50:07] Server Plugins
[21:50:07] --------------
[21:50:07]  Loading plugin: mysql
[21:50:07] 

  > MySQL plugin R5 successfully loaded.

[21:50:07]   Loaded.
[21:50:07]  Loading plugin: streamer
[21:50:07] 

*** Streamer Plugin v2.5 by Incognito loaded ***

[21:50:07]   Loaded.
[21:50:07]  Loading plugin: sscanf
[21:50:07] 

[21:50:07]  ===============================

[21:50:07]       sscanf plugin loaded.     

[21:50:07]          Version:  2.8.1        

[21:50:07]    © 2012 Alex "******" Cole  

[21:50:07]  ===============================

[21:50:07]   Loaded.
[21:50:07]  Loaded 3 plugins.

[21:50:08] 
[21:50:08] Filterscripts
[21:50:08] ---------------
[21:50:08]   Loaded 0 filterscripts.

[21:50:08] [MYSQL]: Connection to `Pilots Heaven` succesful!
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:50:08] Failed to load airline.
[21:50:08] ** 33	<->	Airline Vehicles loaded from	<->	MySQL		   **
[21:50:08] ** 109	<->	Vehicles loaded from	<->	MySQL		   **
[21:50:08] 
----------------------------------
[21:50:08]  Pilots Heaven | By Mehdi
[21:50:08] ----------------------------------

[21:50:08] Number of vehicle models: 118
[21:51:03] Incoming connection: 192.168.0.101:50854
[21:51:03] [join] Mehdi has joined the server (0:192.168.0.101)
[21:51:03] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:51:03] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:51:03] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:51:03] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:51:03] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:51:03] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:51:03] [part] Mehdi has left the server (0:2)
Ill be so happy if i can get this to work
Reply


Messages In This Thread
Help me with replacing old strings - by Geeboi_Mehdi - 01.04.2013, 14:48
Re: Help me with replacing old strings - by SuperViper - 01.04.2013, 15:47
Re: Help me with replacing old strings - by Geeboi_Mehdi - 01.04.2013, 16:47
Re: Help me with replacing old strings - by SuperViper - 01.04.2013, 17:19
Re: Help me with replacing old strings - by Geeboi_Mehdi - 04.04.2013, 22:39
Re: Help me with replacing old strings - by Azazelo - 05.04.2013, 03:53

Forum Jump:


Users browsing this thread: 1 Guest(s)