How do I make a 'mullti' cmd?
#5

Quote:
Originally Posted by CuervO
Посмотреть сообщение
Not exactly. That code is really badly made.

The command checks for strings when it should check for an integer: "[Usage]: /sign [1-4]" 1-4 is a numeric input, therefor sscanf should read an integer, not a string:

pawn Код:
new anim;
sscanf(params,"i",anim);
then what number can be easily checked with if(anim == 1) .. else if(anim == 2) or even with switch statements.

strcmp is for strings, (str prefix (string), cmp suffix (compare)), it essentialy compares two strings. That command should be done with integers, not with strings.
Yes that I know, the GM was made while he was learning so he was sure there where many badly made codes.
Reply


Messages In This Thread
How do I make a 'mullti' cmd? - by Don_Cage - 02.02.2014, 02:18
Re: How do I make a 'mullti' cmd? - by CuervO - 02.02.2014, 03:05
Re: How do I make a 'mullti' cmd? - by Don_Cage - 02.02.2014, 03:10
Re: How do I make a 'mullti' cmd? - by CuervO - 02.02.2014, 03:16
Re: How do I make a 'mullti' cmd? - by Don_Cage - 02.02.2014, 03:40

Forum Jump:


Users browsing this thread: 2 Guest(s)