[Help] Custom npc

Hi, i have attempted to make my own creature gossip script that grants levels and gear depending on what the player chooses, i also made it so it gave the player the item 17124 so that the player cant use it more then once and i am having alot of errors on compile.

Im running TrinityCore rev. 8c44259fae29+ 2014-03-27 21:43:59 +0100 (master branch) (Win32, Release)

Here is my script


And here are my errors


If you could help me fix these problems it would be great thanks

PS im very new to scripting so simple terms would be appreciated /emoticons/default_smile.png.


You used Player (the class) instead of pointer to a player (Player*, the variable player or pPlayer).

In my code I changed all player pointers to be named player and creature pointers to creature.
The MonsterWhisper function takes player pointer (Player*), not player guid(player->GetGUID() / uint64) (due to recent TC updates)

The script loader function had wrong class name in it, also changed the function name. (the thing at the bottom of file)

A comment was not complete (used single / instead of //)

Incomplete or mismatching use of brackets {} ( for example the switch uses switch(){…} and you had switch(){… )

New indentation provided by VC2013… I think the case brackets look ugly : |

Especially with the break like that…

Thanks so much Rochet2 not only for the quick reply and you actually fixing my script, but for the fact that you explained exactly what was wrong with the script and how to fix it.

you have been a huge help, thank you so much! /emoticons/default_smile.png