12.10.2012, 06:02
In that case, I know the problem. Your 'pCash' isn't defined anywhere in your script.
As you can see, I didn't ever create this "pCash".
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)
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;
}
Код:
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
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)