i found an error on this line
MessagePlayer( "[#40FF00][COMMAND] - [#F7FE2E]You have sold out your " + GetVehicleNameFromModel( FindVehicle( text.tointeger() ).Model ) + "." player);
What error?
... + "." player);
You forgot another +
... + "." + player);
Next time post the error output. Otherwise we might stop responding to your questions!
-_- check the function again its
Quote+ GetVehicleNameFromModel( FindVehicle( text.tointeger() ).Model ) +
not
Quote+ GetVehicleNameFromModel( FindVehicle( text.tointeger() ).Model ) + "." +
and why we use + both side of "."
Quote from: S.L.C on May 13, 2015, 03:46 PMWhat error?
... + "." player);
You forgot another +
... + "." + player);
Next time post the error output. Otherwise we might stop responding to your questions!
It's actually
... + ".", player);
Because + means concatenate. And without it, Squirrel doesn't know what to do.
Here's some homework for you:
- Jimmy has 6 pieces of paper.
- Now he wishes to glue them together.
- He glues the first 4 and starts to wonder.
- "Why do I need to add glue on both ends?" :-\
- And he decide to test that idea.
- Your task is to answer: What would be the result of his action?
EDIT: @Shadow Crap, I'm used to have wrappers around those functions and the player is among the first arguments because it's more intuitive. I was wondering why the hell would he try to concatenate with a player :D
i know about this ( + ) i was just telling you Server give error if you use + after ( .)
QuoteJimmy has 6 pieces of paper.
Now he wishes to glue them together.
He glues the first 4 and starts to wonder.
"Why do I need to add glue on both ends?" :-\
And he decide to test that idea.
Your task is to answer: What would be the result of his action?
explane good but that's not my point
@Shadow SOrry bro Not work
An console error screenshot is necessary to get what is error about
MessagePlayer( "[#40FF00][COMMAND] - [#F7FE2E]You have sold out your " + GetVehicleNameFromModel( FindVehicle( text.tointeger() ).Model ) + "." player); // Here not have ","
MessagePlayer( "[#40FF00][COMMAND] - [#F7FE2E]You have sold out your " + GetVehicleNameFromModel( FindVehicle( text.tointeger() ).Model ) + ".", player); // Correct!