AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with this formatting error can't figure it out. (https://forums.alliedmods.net/showthread.php?t=11264)

teame06 03-14-2005 02:57

Help with this formatting error can't figure it out.
 
Alright i'm having little trouble with this path coding. i'm getting this error.
Quote:

L 03/16/2005 - 00:43:41: [AMXX] Run time error 25 (parameter error) on line 75 (file "mapchooser2.sma").
L 03/16/2005 - 00:43:41: String formatted incorrectly - parameter 5 (total 4)
Code:

new filename[64], filepath[64], logfilename[256]
get_basedir(filepath, 63)
format(filepath, 63, "%s/logs", filepath)
format(filename, 63, "%s/L%m%d.log", filepath)
get_time(filename,logfilename,255)


Quote:

Originally Posted by Hard Code Path
get_time("addons/amxmodx/logs/L%m%d.log",logfilename,255)

when i have it hard code path it works fine no error but when i try this code to remove the hard code path it comes with a error and there is no compiling error either. I am porting over MapChooserII from amxmod cuz i can't find a plugin here that only does remember last 5 maps i don't need anything else for the mapchooser. So i hope someone can help me thanks.

teame06 03-17-2005 02:25

Help, please help.

XxAvalanchexX 03-17-2005 21:47

Code:
format(filename, 63, "%s/L%m%d.log", filepath)

%s, %m, and %d are all data.. things... to be replaced. However, you only specify the value to replace it with for one, filepath.


All times are GMT -4. The time now is 14:15.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.