Help:VE220: Difference between revisions

From TrainzOnline
Jump to navigationJump to search
Dundun92 (talk | contribs)
No edit summary
Dundun92 (talk | contribs)
No edit summary
Line 9: Line 9:


The declared function is void, but the actual function is int;
The declared function is void, but the actual function is int;


It could also mean you have the same function declared twice with different parameters:
It could also mean you have the same function declared twice with different parameters:


   int DetermineCarPosition(void);
   int DetermineCarPosition(void);

Revision as of 05:50, 8 May 2023

This could mean the declared functions return type is different from the actual function.

void GetSpeed(bool dir);

int GetSpeed(bool dir) {

}

The declared function is void, but the actual function is int;


It could also mean you have the same function declared twice with different parameters:

 int DetermineCarPosition(void);
 void SetTwoDigitCode(string code);
 void SetDestination(string code);
 void SetTexture(int index);
 void SetAttachment(int side, int middle, int high, int highbeam);
 void SetDestination(int index, int code);