Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,618 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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