Argument Type Mismatch (argument 1)
#10

https://sampwiki.blast.hk/wiki/Scripting_Basics#Strings

It's the size of the string. It can get 83 characters and a NULL termination character. Those two messages will never go over 84 characters so there's not reason to make it bigger.

I'll show you an example:

String: "AdmCmd: %s has made %s admin level %d"

Characters in that string so far: "AdmCmd: has made admin level " -> 31 characters + NULL = 32 (size).

We have 2 names to be displayed (MAX_PLAYER_NAME = 24) so 32 (the above) + 48 = 80 (size).

The level left, so assuming the max lenght of it is 4 (max 1337 level) - the final size is 84! It's a good habbit to count the characters and optimize the code by not wasting pointless bytes.
Reply


Messages In This Thread
Argument Type Mismatch (argument 1) - by canadianclass - 04.01.2014, 15:07
Re: Argument Type Mismatch (argument 1) - by FShiwani - 04.01.2014, 15:29
Re: Argument Type Mismatch (argument 1) - by MatriXgaMer - 04.01.2014, 15:42
Re: Argument Type Mismatch (argument 1) - by Hansrutger - 04.01.2014, 15:45
Re: Argument Type Mismatch (argument 1) - by canadianclass - 04.01.2014, 16:49
Re: Argument Type Mismatch (argument 1) - by iOxide - 04.01.2014, 16:53
Re: Argument Type Mismatch (argument 1) - by Konstantinos - 04.01.2014, 16:57
Re: Argument Type Mismatch (argument 1) - by MatriXgaMer - 04.01.2014, 17:04
Re: Argument Type Mismatch (argument 1) - by canadianclass - 04.01.2014, 17:22
Re: Argument Type Mismatch (argument 1) - by Konstantinos - 04.01.2014, 17:33

Forum Jump:


Users browsing this thread: 3 Guest(s)