SM::SpawnPlayer

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

Post Reply
Alaanor
Posts: 16
Joined: 15 Apr 2013, 19:46

SM::SpawnPlayer

Post by Alaanor »

Hi,
I search a solution since today at 1am to this stupid maniascript problem. :roflol:

At midnight I just started the "Your first script" Tutorial. (When you click on the link you are scrolled to "function" section.) And In the "function" section we have this:

Code: Select all

SM::SpawnPlayer(_Player, 0, MapLandmarks_PlayerSpawn[SpawnId]);
But when I compile the script I get this error:
Incorrect arguments to call the function SpawnPlayer.
Here I have two way for solve this.
1) Generate the documentation and see what are the required argument.
2) See the source code (Melee_Tuto.Script.txt) at the end of page.

In the first way, I tried two online generated documentation here and here. The arguments on online documentation is different than the tutorial. :cry:
Ok, maybe the doc is not updated, so I manually generated the documentation (I follow the step here). Same arguments. :roflol:

In the second way this line is little different:

Code: Select all

SM::SpawnPlayer(_Player, 0, BlockSpawns[SpawnId]);
Yeah that the famous "BlockSpawns" and... huh that work ! But we have this:
Use of member BlockSpawns is deprecated: Use MapLandmarks_PlayerSpawn.
Huh ! :o

So, please tell me what can I do now :? .
Alaanor
Posts: 16
Joined: 15 Apr 2013, 19:46

Re: SM::SpawnPlayer

Post by Alaanor »

Yeah that really five minute after :roflol:

I just found with the steeffeen's script.

The correct line is:

Code: Select all

SM::SpawnPlayer(_Player, 0, MapLandmarks_PlayerSpawn[SpawnId].PlayerSpawn);
Now I can debug the next problem :roflol: (I'm so mad ...)
Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 2 guests