A problem with a FS I am making. - 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: A problem with a FS I am making. (
/showthread.php?tid=305092)
A problem with a FS I am making. -
[MM]18240[FMB] - 21.12.2011
Sorry if this is in wrong section. When I try to compile my script it says
C:\Documents and Settings\Parent\Desktop\JColor.pwn(66) : error 021: symbol already defined: "OnPlayerCommandText"
C:\Documents and Settings\Parent\Desktop\JColor.pwn(8

: error 021: symbol already defined: "OnPlayerCommandText"
C:\Documents and Settings\Parent\Desktop\JColor.pwn(110) : error 021: symbol already defined: "OnPlayerCommandText"
C:\Documents and Settings\Parent\Desktop\JColor.pwn(132) : error 021: symbol already defined: "OnPlayerCommandText"
What do I do?
Re: A problem with a FS I am making. -
Hoborific - 21.12.2011
Show the code lines....
Re: A problem with a FS I am making. -
Ash. - 21.12.2011
You already have 'OnPlayerCommandText' in the script, and you've tried to re-add it. Merge the duplicate callbacks, and those errors will disappear.
Re: A problem with a FS I am making. -
[MM]18240[FMB] - 21.12.2011
Quote:
Originally Posted by funky1234
You already have 'OnPlayerCommandText' in the script, and you've tried to re-add it. Merge the duplicate callbacks, and those errors will disappear.
|
Umm not to sound dumb but how do I do that?
Re: A problem with a FS I am making. -
Ash. - 21.12.2011
You have more than one
pawn Код:
public OnPlayerCommandText { ... }
section in your script. You need to merge them together.
For example:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
//Your script = Segment one
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
//Some more of your script = Segment two
return 0;
}
Should become:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
//Segment One (labelled as 'Your Script' in the above example)
//Segment Two (labelled as "Some more of your script" in the above example)
return 0;
}
I hope that explain it a bit better. If you have tried and still cannot do it, I'll be happy to do it for you if you upload it to PasteBin and the PM me the link.