Gamestudio Links
Zorro Links
Newest Posts
webGL
by Ice2642. 11/17/25 21:27
Camera always moves upwards?
by NeoDumont. 11/17/25 09:56
Future of ZorroHFT
by TipmyPip. 11/16/25 13:52
COT Download with Quandl does not work
by Petra. 11/15/25 09:35
Training with the R bridge does not work
by Petra. 11/15/25 09:31
Zorro 2.70
by jcl. 11/15/25 08:43
brokerCommand PLOT_HLINE parameters
by M_D. 11/13/25 10:42
ZorroGPT
by TipmyPip. 11/10/25 11:04
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, SkinnyApe, 1 invisible), 7,580 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
SkinnyApe, tritom, sheliepaley, Blueguy, blobplayintennis
19179 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Syntax error: Can´t convert P_GE:POINTER:LONG:LONG. #372686
06/03/11 16:04
06/03/11 16:04
Joined: Apr 2007
Posts: 125
Brazil - São Paulo
Ericmor Offline OP
Member
Ericmor  Offline OP
Member

Joined: Apr 2007
Posts: 125
Brazil - São Paulo
Hi guys;
I´m reestructuring a large old project, and ran into a problem.
Two simple functions calls each other in separate scripts:
Function in script 1:
Code:
function player_mode(var* modeplayer)
{
  if(modeplayer==1)
 {
 //initializes third camera mode
  camera_mode=1;
  CAMERASTART();
  return;
 }
 
  if(modeplayer==2)
 {
 //initializes first person camera mode
  camera_mode=2;
  CAMERASTART();
  return;
 }
 
 if (modeplayer>=3)
 {
 	player_mode(1);
 	error("player mode not made yet!");
 }
 wait(1);	
}



Functions in script 2:
Code:
//prototype
function player_mode(modeplayer);

function initial_event()
{
 player_mode(1);
 wait(1);	
}



As the function calls for "player_mode", i get the following error:
Quote:

Error in 'playermode.c' line 344:
Syntax error:Can´t convert P_GE:POINTER:LONG:LONG.
< if (modeplayer>=3)
>

I know i made a mistake, but where?
When i declared the prototype with the condidtions like "var* modeplayer" instead of simple "modeplayer", i was getting a syntax error.
Any help is appreciated, thanks in advance.

Re: Syntax error: Can´t convert P_GE:POINTER:LONG:LONG. [Re: Ericmor] #372730
06/03/11 20:42
06/03/11 20:42
Joined: Feb 2011
Posts: 135
Myrkling Offline
Member
Myrkling  Offline
Member

Joined: Feb 2011
Posts: 135
Probably you don't want to use a pointer there, so use
var modeplayer
instead of
var* modeplayer.

Re: Syntax error: Can´t convert P_GE:POINTER:LONG:LONG. [Re: Myrkling] #372758
06/04/11 02:11
06/04/11 02:11
Joined: Apr 2007
Posts: 125
Brazil - São Paulo
Ericmor Offline OP
Member
Ericmor  Offline OP
Member

Joined: Apr 2007
Posts: 125
Brazil - São Paulo
Thanks Myrkling!
It worked!(meaning, the error message is other!...)


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1