Raised This Month: $ Target: $400
 0% 

Symbol already defined?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SentryIII
Junior Member
Join Date: Oct 2004
Old 10-13-2005 , 01:42   Symbol already defined?
Reply With Quote #1

Hi, this doesnt make sense to me. Its telling me 'format' is already defined? Little help here please...

Code:
new reports_filename[128],requests_filename[128],logspath[64],basepath = get_basedir() format(logspath, 63, "%s/logs/", basepath) format(reports_filename, 127, "%s/reports.log", logspath) format(requests_filename, 127, "%s/requests.log", logspath)

Code:
Welcome to the AMX Mod X 1.60-300 Compiler.
Copyright (c) 1997-2005 ITB CompuPhase, AMX Mod X Team

Error: Symbol already defined: "format" on line 11
Warning: Symbol is never used: "basepath" on line 99
Warning: Symbol is never used: "logspath" on line 99

1 Error.
Could not locate output file C:\Program Files\AMXX Studio\plugins\rnr.amx (compile failed).
Line 11 is:
Code:
format(logspath, 63, "%s/logs/", basepath)
SentryIII is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-13-2005 , 01:45   Re: Symbol already defined?
Reply With Quote #2

Quote:
Originally Posted by SentryIII
Hi, this doesnt make sense to me. Its telling me 'format' is already defined? Little help here please...

Code:
new reports_filename[128],requests_filename[128],logspath[64],basepath = get_basedir() format(logspath, 63, "%s/logs/", basepath) format(reports_filename, 127, "%s/reports.log", logspath) format(requests_filename, 127, "%s/requests.log", logspath)

Code:
Welcome to the AMX Mod X 1.60-300 Compiler.
Copyright (c) 1997-2005 ITB CompuPhase, AMX Mod X Team

Error: Symbol already defined: "format" on line 11
Warning: Symbol is never used: "basepath" on line 99
Warning: Symbol is never used: "logspath" on line 99

1 Error.
Could not locate output file C:\Program Files\AMXX Studio\plugins\rnr.amx (compile failed).


Line 11 is:
Code:
format(logspath, 63, "%s/logs/", basepath)

Take out one of these

Code:
format(reports_filename, 127, "%s/reports.log", logspath) format(requests_filename, 127, "%s/requests.log", logspath)


I have no clue why you did it twice...
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
SentryIII
Junior Member
Join Date: Oct 2004
Old 10-13-2005 , 01:47  
Reply With Quote #3

Because there are two different log files using the same path...
SentryIII is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-13-2005 , 01:50  
Reply With Quote #4

you formated the same variable twice in a row.

You cant assign the same variable two different paths ( unless you make it a two demension array ), so just use two variables, problem solved.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-13-2005 , 01:54  
Reply With Quote #5

Post the code preceding it, it usually happens when you do something horribly wrong on a public function definition.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
SentryIII
Junior Member
Join Date: Oct 2004
Old 10-13-2005 , 02:02  
Reply With Quote #6

Quote:
Originally Posted by Zenith77
you formated the same variable twice in a row.
You cant assign the same variable two different paths ( unless you make it a two demension array ), so just use two variables, problem solved.
I think you are a bit confused, maby this will help.
Code:
format ( output[], len, const format[], ... )
Example:
Code:
new dest[21] format(dest, 20, "Hello %s. You are %d years old", "Tom", 17)
Here you see 'dest' is the variable you assign. Now look at my usage:
Code:
format(reports_filename, 127, "%s/reports.log", logspath) format(requests_filename, 127, "%s/requests.log", logspath)
Look closely, but you will see that I am assigning two different variables, reports_filename and requests_filename.

This isnt even the problem, my question is still how is 'format' already defined. Im not even using it as a variable...
SentryIII is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-13-2005 , 02:05  
Reply With Quote #7

O crap, i really need to get to bed lol, for some reason i assumed they were the same thing, sry man,


( ZOMG ITS 1:05 am !?!?!?! )


p.s. I know what format does, i am not a noob.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 10-13-2005 , 02:16  
Reply With Quote #8

make sure you dont have like
new format somewhere in the function or as a global
Freecode is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-13-2005 , 15:07  
Reply With Quote #9

Just post the entire function up to that point.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:40.


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