Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 1,086 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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 | chip programmers | 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