04.09.2014, 19:17
the identifer of a global variable has to be unique.
meaning something like
will throw the same warning.
"warning 219: local variable "random_stuff" shadows a variable at a preceding level"
this means that somewhere in your script is a variable by the name "playerid"
search for it and get rid of it.
especially "playerid" as identifer... really bad choice if it's a global one,
as most of the callbacks contain a "playerid" param.
also, generating too much global variables isn't good.
Stuff will get messy after some time.
Try to stay local & use pointers wherever you can
also, i suggest using a switch instead of these endless control structures
meaning something like
pawn Код:
#include "a_samp"
main(){}
new random_stuff;
public OnGamemodeInit()
{
new random_stuff;
return 1;
}
"warning 219: local variable "random_stuff" shadows a variable at a preceding level"
this means that somewhere in your script is a variable by the name "playerid"
search for it and get rid of it.
especially "playerid" as identifer... really bad choice if it's a global one,
as most of the callbacks contain a "playerid" param.
also, generating too much global variables isn't good.
Stuff will get messy after some time.
Try to stay local & use pointers wherever you can
also, i suggest using a switch instead of these endless control structures