05.05.2015, 13:26
Quote:
Why would you suggest him a command processor. I don't think that piece of code is even related to any command processor or even sscanf.
He's just asking a method to detect what values a player typed (known as params in YCMD, ZCMD..). My code will work because you can't have direct integers from a command, you always have to convert it using strval, strtok, sscanf... And strval don't read int values, they convert https://sampwiki.blast.hk/wiki/Strval |
Thanks for repeating my words.
I'm just trying to help him, with whatever method he chooses and prevent him running into another invalid code.
Look at this (what you posted):
switch(strval(garageid))
garageid is integer. strval converts a string into integer.
The use of strval isn't wrong here (in the switch), but garageid is not a string that can be converted by strval.