Help with a command
#1

Hey guys i'm making a command to create a business. For some reason though when typing the Name of the business... depending on what 'Category' I put it under.. it changes the 2nd character of the name.. any ideas?
Here is the code that is making it do that, I just can't figure out what part.
pawn Код:
if(sscanf(params,"sii", BuzName, BuzCategory, BusPrice)) return SendClientMessage(playerid,-1,"USAGE: /createbus <Category 1-5> <price> <Name>");

format(BusInfo[id][BusName], 24, BuzName);

dini_Set(File2, "BusName", BusInfo[id][BusName]);
Any ideas? Thanks
Reply
#2

pawn Код:
if(sscanf(params,"iis", BuzCategory, BusPrice,BuzName)) return SendClientMessage(playerid,-1,"USAGE: /createbus <Category 1-5> <price> <Name>");
is iis becouse your want 1-5 , price ,name so that means that Category 1-5 is a variable so its an I
then same with the price and the Name is a Sting
you got them in the wrong order
Reply
#3

What order should it be in?
Reply
#4

Quote:
Originally Posted by park4bmx
Посмотреть сообщение
is iis becouse your want 1-5 , price ,name so that means that Category 1-5 is a variable so its an I
If it's a variable it doesn't mean it should stand for "i", perhaps you mean integer.
Reply
#5

Quote:
Originally Posted by SmiT
Посмотреть сообщение
If it's a variable it doesn't mean it should stand for "i", perhaps you mean integer.
integer is what i ment yes sorry ;X
Reply
#6

So what exactly is wrong with it?? It seems to change the 2nd character to some weird character depending on what category I choose... so I think something is happening with the sscanf....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)