Script Error
#1

Solved Thanks for all help
Reply
#2

pawn Код:
if(sscanf(params,"ud",id,amount,price))
2 specifiers and 3 variables to store to.

Change to "udd".
Reply
#3

Solved
Reply
#4

No, no.. on the /sellsteel command, replace:
pawn Код:
if(sscanf(params,"ud",id,amount,price)) return SyntaxMSG(playerid, "/sellsteel [playerid/PartOfName] [amount] [price]");
with:
pawn Код:
if(sscanf(params,"udd",id,amount,price)) return SyntaxMSG(playerid, "/sellsteel [playerid/PartOfName] [amount] [price]");
You forgot to add the last "d" specifier so price stays 0.
Reply
#5

Solved
Reply
#6

alright worked alot better but now i have another problem when i type /teststeel [playerid][amount][price]

I get a message "you have sent a steel request to "playername" works fine
and the other player that i offer gets a message "Playername" offers you steels for "price". (accept steel if yo uwant it.


when i type /accept steel it says you have not been offered any steel
Reply
#7

pawn Код:
if(id == 0) return SCM(playerid, COLOR_INFO, "You have not been offered any steel.");
If the playerid is 0 returns error. This should not be happen. When resetting, set to INVALID_PLAYER_ID not to 0.

And then check:
pawn Код:
if(id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_INFO, "You have not been offered any steel.");
Reply
#8

Solved
Reply
#9

Thanks for the help! was alot usefull!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)