Sarrus1 / sourcepawn-studio

VSCode extension for SourcePawn scripting
https://sarrus1.github.io/sourcepawn-studio/
MIT License
147 stars 23 forks source link

Bad snippet generation for forwards with arrays in them #253

Closed dysphie closed 2 years ago

dysphie commented 2 years ago

Basic information

Further Information

Some snippets generate wrongly where arrays such as float var[3] becomes float var instead

To Reproduce

Type $OnPlayerRunCmd and let it autocomplete

Resulting code:

public Action OnPlayerRunCmd(int client, int & buttons, int & impulse, float vel, float angles, int & weapon, int & subtype, int & cmdnum, int & tickcount, int & seed, int mouse)

Proper code:

public Action OnPlayerRunCmd(int client, int& buttons, int& impulse, float vel[3], float angles[3], int& weapon, int& subtype, int& cmdnum, int& tickcount, int& seed, int mouse[2])