SA-MP Forums Archive
code's location - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: code's location (/showthread.php?tid=109343)



code's location - Sfinx_17 - 19.11.2009

when i create a comand with "new" where have to be the code then? in my script i mean
for example...this code
Код:
new
   a = 5;
if(a == 5)
   printf"the a in this code is really 5"



Re: code's location - Cedimedi - 19.11.2009

if you want to make it global, the "new" allways come on top of your script.


Re: code's location - Sfinx_17 - 19.11.2009

ok i allready tryed but why i get errors?


Re: code's location - Mikep. - 19.11.2009

printf("the a in this code is really 5");

function(parameters);


Re: code's location - Sfinx_17 - 19.11.2009

you mean i forgot the "(" ")" brackets?


Re: code's location - iLinx - 19.11.2009

Quote:
Originally Posted by Sfinx_17
you mean i forgot the "(" ")" brackets?
what he means is that in pawn, every "command" (these are referred to as a function) that you send to the server to do (ie printf, sendclientmessage, sethealth, etc) are in this format;
function(parameters);

for example:
print("diditfortehlulz");
will print out diditfortehlulz