[HELP]Converting YCMD to ZCMD -
RenovanZ - 12.10.2012
Removed
Re: [HELP]Converting YCMD to ZCMD -
Kwarde - 12.10.2012
Just include ZCMD (and exclude YCMD) and change all the 'YCMD:' to 'CMD:'.
So, if you have this:
pawn Код:
#include <a_samp>
#include <YCMD>
YCMD:command(playerid, params[])
{
//Command
}
Change it to:
pawn Код:
#include <a_samp>
#include <zcmd>
CMD:command(playerid, params[])
{
//Command
}
The fastest way to change ALL the "YCMD:" to "CMD:" is like this:
1) In pawno, press CTRL+H
2) In the "Search for:" box, typ:
YCMD:
3) In the "Replace with:" box, typ:
CMD:
4) Press ENTER
( 5) Press F5 to compile )
And then it's done. Should be done within a minute.
As for the params[], I guess that script is using SSCANF (it params are used). This also works in ZCMD (obviously). If you can't seem to done this, you can send your .PWN script to me in PM (and upload this script on pastebin as "private" or something) and I will do this for you, and send it back. But since this work is so easy, I don't think you'll fail in doing this.
Re: [HELP]Converting YCMD to ZCMD -
RenovanZ - 12.10.2012
Removed
Re: [HELP]Converting YCMD to ZCMD -
Faisal_khan - 12.10.2012
Paste the lines please.
Re: [HELP]Converting YCMD to ZCMD -
Kwarde - 12.10.2012
It's just one line I see (@Faisal_khan). Please provide line "28775". You can find the line the fastest by doing this:
1) Press CTRL+G
2) Typ
28775
3) Press ENTER
And you're on that line. Please copy that line and provide it here.
p.s.
I'm not sure if you know all these shortcuts yet, but since you didn't know how to convert to ZCMD that fast I assumed you didn't know of CTRL+H, and so I automatically presume you don't know CTRL+G either
Re: [HELP]Converting YCMD to ZCMD -
RenovanZ - 12.10.2012
Removed
Re: [HELP]Converting YCMD to ZCMD -
Kwarde - 12.10.2012
Why would you make a new variable with the value of "pCash[playerid]" if you have this "pCash[playerid]" already?
EDIT:
Is the "Money" value in the enum for the 'PlayerInfo'? Because I see the "PlayerInfo[playerid][Money]" << If it is in the enum, you get this error because you are creating it again. (I think, I'll run some diagnostics now)
Re: [HELP]Converting YCMD to ZCMD -
RenovanZ - 12.10.2012
Removed
Re: [HELP]Converting YCMD to ZCMD -
Kwarde - 12.10.2012
In that case, I know the problem. Your 'pCash' isn't defined anywhere in your script.
pawn Код:
#include <a_samp>
enum t
{
//VarA,
VarB
};
new Test[MAX_PLAYERS][t];
public OnFilterScriptInit()
{
new VarA = pCash[0];
Test[0][VarA] = 1;
return 1;
}
As you can see, I didn't ever create this "pCash".
Код:
C:\Users\Kevin\AppData\Local\Temp\tmp.pwn(12) : error 017: undefined symbol "pCash"
C:\Users\Kevin\AppData\Local\Temp\tmp.pwn(12) : warning 215: expression has no effect
C:\Users\Kevin\AppData\Local\Temp\tmp.pwn(12) : error 001: expected token: ";", but found "]"
C:\Users\Kevin\AppData\Local\Temp\tmp.pwn(12) : error 029: invalid expression, assumed zero
C:\Users\Kevin\AppData\Local\Temp\tmp.pwn(12) : fatal error 107: too many error messages on one line
That's the errors I get. So you shouldn't use pCash, just the PlayerInfo[playerid][Money],
unless if you don't have this in your script.
TIP:
Just download an existing gamemode, look arround in it and edit some stuff. Eg. add things, remove things etc. That's how I learned scripting (and by reading tutorials/wiki off course, but this gamemode editting [DON'T RELEASE THE EDITTED GAMEMODE THEN! Very important] works very good)
Re: [HELP]Converting YCMD to ZCMD -
RenovanZ - 12.10.2012
Removed